This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

email based relay

I would not have thought that what I wanted to do would be difficult but, as usual, that has not proven to be the case....

All I want to be able to do is to allow a specified email address to relay through the SMTP proxy.

Using the PHP mail functionality on my web server I have not been able to get the mail message through the proxy unless I add the web server to the Allowed hosts/networks list (this does work but it's not desirable).
What I would ideally like is to only allow a specified email address (the one used in the PHP mail script) to relay through the proxy.
I created a user with the specified email address and added that to the Allowed users/groups list but this did not work. Silly to think that it would be that simple... [;)]
The help was not that helpful unfortunately.

I'm probably missing something simple.
Hopefully one of you more knowledgable guys can point me in the right direction.


This thread was automatically locked due to age.
Parents
  • If I understand correctly, you want the SMTP Proxy to handle all inbound email normally, but you want only the email from your web server to be handled by the proxy while all other outbound email bypasses the proxy.

    To do that, you can turn on the Transparent mode.  Create two network definitions that encompass your entire internal network, but leave out the IP of the webserver.  Put these two definitions into the 'Transparent mode skiplist'.  You also need to see that your webserver is the only thing in 'Host based relay'.  Now, all outbound SMTP traffic from your webserver will be handled by the proxy, but nothing else.

    It seems strange to me that one would want to do this, so I expect that I have misunderstood what you want to accomplish.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Bob, I think he's saying he wants to use the proxy, and:

    He has a webserver, and he wants the webserver to be able to send email through the proxy, but only from a certain 'from' address.
    i.e. if the webserver tries to send emails using a different address, the proxy should block it.

    I'd guess he does want the rest of his network to use the proxy.

    Barry
Reply
  • Bob, I think he's saying he wants to use the proxy, and:

    He has a webserver, and he wants the webserver to be able to send email through the proxy, but only from a certain 'from' address.
    i.e. if the webserver tries to send emails using a different address, the proxy should block it.

    I'd guess he does want the rest of his network to use the proxy.

    Barry
Children
  • Sorry if I was not clear enough. All of what Barry has sumised is absolutely correct.

    I already have my mail server in the Host-based relay, which is fine. What I did not really want to do is allow mail to be sent from just any address on the web server, given that I do not know how secure/insecure this may be.
    Of course I can add the web server to the Host-based relay; in fact I did and that does work, but it is not really what I want to do.
    What I would like to know is if it is possible to allow a single email address, sent from the web server, to be relayed through the SMTP proxy.
    Setting up a user with that email address did not work; is there another way?
  • I don't think there's a way to do that on the Astaro, and I suspect that Barry would have offered one if he knew one.  Have you tried using 'Authenticated relay'?  I suspect that an authenticated user can send an email with any 'From' address, but I haven't tried it.

    I don't know what webserver and mail server you're using, but I wonder if you couldn't achieve what you want with an account on your mail server.

    I'll be interested to know if you can find a solution.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Good idea Bob...
    Authentication should work if you can add the auth settings to your application on the webserver.

    Barry
  •  I suspect that an authenticated user can send an email with any 'From' address, but I haven't tried it.


    Yeah, I would think so too. The problem is, as I've said, I have not been able to get this to work either.
    I have even tried to configure the user to have no authentication, but when I did this I got a warning message and could not save the changes:
    You did not enter all required data, or one or more settings are syntactically invalid.

    There is nothing in the help about this, so I'm a bit stumped.

    I am just trying to send a message using PHP's inbuilt SMTP functionality through the ASG.
    If someone knows how to pass authentication information to Astaro via PHP I am more than willing to try that. Actually, I am willing to try just about anything that will allow me to just let a single email address pass through the SMTP proxy.

    Any ideas?
  • I just want to know two things.

    1. Is this technically possible?
    2. If yes, how do I configure my ASG to do this?
  • Maybe you can find a way to block all emails from the webserver then add an exception for the individual sender email.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Any ideas on how one might do this?