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

Enabling smtp proxy causes all sent mails to fall in spam

Hi,

When I enable smpt proxy, all mails sent from our mail server fall to spam (on gmail) or completely denided on some servers with a RDNS error.

I am not an email server expert, so I realy need some advice here.


This thread was automatically locked due to age.
  • Hi,
    I am not an e-mail expert either.

    Does you outgoing mail get tagged if you don't use the proxy?

    Your issue is to do with what you have enabled in the ASG. Check the smtp log to see what is happening. I suspect you company internet address has been tagged as a source of spam by one of the checking agencies. Try disabling one function at a time to identify the cause.

    Ian M
  • Hi,
    I am not an e-mail expert either.

    Does you outgoing mail get tagged if you don't use the proxy?

    Your issue is to do with what you have enabled in the ASG. Check the smtp log to see what is happening. I suspect you company internet address has been tagged as a source of spam by one of the checking agencies. Try disabling one function at a time to identify the cause.

    Ian M


    There is no problem if I disable smtp proxy. All sent mails are received normally. But with smtp proxy enabled they are all doomed. This is a university domain.

    here is my config:








    And what should I look for in smtp proxy logs?

    Thanks
  • Hi,
    first thing I would suggest is you use the ubb attachment facility, means less junk on the screen.

    You need to be looking at greylisting, rbls etc.

    Also not sure why you have your mail servers in the skip transparent mode, my understanding of that is they go out the PF rule not the proxy, but hey I am always open to learn.

    Ian M
  • When I enable smpt proxy, all mails sent from our mail server fall to spam (on gmail) or completely denided on some servers with a RDNS error.

    Some basics:
    • The Hostname for your Astaro should be the content of the primary MX record in your public authoritative name server.  If it isn't, go to the 'Advanced' tab in SMTP and change the 'Advanced settings' section:

      Setting the Hostname will cause the system to use the specified name in HELO and SMTP banner strings. By default the normal system hostname is used. The Postmaster address will receive messages that are sent to addresses of the form 'postmaster@[ip.ad.dr.es]'. Accepting such email is an RFC requirement.


    • The 'Hostlist' on the 'Routing' tab should contain the host definition for your mail server.
    • On the 'Relaying' tab, the host definition for your mailserver should be in 'Host-based relay'.  You also must configure your mailserver to point at the Astaro as a smarthost.
    • You should not have anything else filled in on the 'Relaying' tab except to check 'Scan relayed (outgoing) messages' at the bottom.

    Most importantly, on the 'Advanced' tab, don't use transparent mode - clear that section completely.

    What are those hosts you just removed from the 'Skip transparent mode...' list?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Well, let me start from the bottom [:)]
    I didn't configured the smtp proxy settings myself. Some other guy did it. So I have no idea why its configured that way. The  networks in the skip list are our university's ip range, nat and real ip blocks. But I removed them as you suggested.

    In Routing, HostList contains our mail server.

    The Relaying is configured as you suggested.

    There we came the problematic part. Let me explain our system first: Astaro's hostname is security.mydomain.com, our mail server is posta.mydomain.com (that is defined in our mx record). As I understand you want me to change the hostname in Advanced tab to posta.mydomain.com, right? Well I did as you said. This time I gel mail delivery fail on every mail sent. Here is the delivery error message: 

    >>                   The mail system

    >>    : mail for gmail.com loops back to myself

    and some postfix logs:


     postfix/smtp[3590]: warning: host gmail-smtp-in.l.google.com[74.125.39.27]:25 greeted me with my own hostname posta.mydomain.com

     postfix/smtp[3590]: warning: host gmail-smtp-in.l.google.com[74.125.39.27]:25 replied to HELO/EHLO with my own hostname posta.mydomain.com

    Hope these make sense to you.
  • Have you changed the mail server to point to the Astaro's "Internal (Address)" IP as SmartHost?

    As I recall, you had different things in 'Host-based relay' and the 'Hostlist', but I can't bring your attachments up any more.

    Perhaps you can show all of the lines in the SMTP log relative to an attempt to send.

    Cheers - Bob
    PS Like Ian said, use the picture attachment here by hitting the [Go Advanced] button beside the [Post Quick Reply] button below.  Just click on the paperclip.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Here is postfix log:



    Jul 22 08:14:35 artvin dovecot: pop3-login: Login: user=, method=PLAIN, rip=79.123.252.51, lip=79.123.252.51, secured
    
    Jul 22 08:14:35 artvin dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (mailserver)
    Jul 22 08:14:35 artvin dovecot: POP3(denemesil@artvin.edu.tr): Disconnected: Logged out top=0/0, retr=0/0, del=0/3, size=7682
    Jul 22 08:15:16 artvin postfix/smtpd[22508]: connect from artvin.edu.tr[79.123.252.51]
    Jul 22 08:15:16 artvin postfix/smtpd[22508]: 40D3328A08D: client=artvin.edu.tr[79.123.252.51]
    Jul 22 08:15:16 artvin postfix/cleanup[22511]: 40D3328A08D: message-id=
    Jul 22 08:15:16 artvin postfix/qmgr[3578]: 40D3328A08D: from=, size=664, nrcpt=1 (queue active)
    Jul 22 08:15:16 artvin postfix/smtpd[22508]: disconnect from artvin.edu.tr[79.123.252.51]
    Jul 22 08:15:18 artvin postfix/smtp[22513]: warning: host gmail-smtp-in.l.google.com[74.125.39.27]:25 greeted me with my own hostname posta.artvin.edu.tr
    Jul 22 08:15:18 artvin postfix/smtp[22513]: warning: host gmail-smtp-in.l.google.com[74.125.39.27]:25 replied to HELO/EHLO with my own hostname posta.artvin.edu.tr
    Jul 22 08:15:18 artvin postfix/smtp[22513]: 40D3328A08D: to=, relay=gmail-smtp-in.l.google.com[74.125.39.27]:25, delay=2.1, delays=0.01/0.01/2.1/0, dsn=5.4.6, status=bounced (mail for gmail.com loops back to myself)
    Jul 22 08:15:18 artvin postfix/cleanup[22511]: 7E87928A091: message-id=
    Jul 22 08:15:18 artvin postfix/bounce[22516]: 40D3328A08D: sender non-delivery notification: 7E87928A091
    Jul 22 08:15:18 artvin postfix/qmgr[3578]: 7E87928A091: from=<>, size=2492, nrcpt=1 (queue active)
    Jul 22 08:15:18 artvin postfix/qmgr[3578]: 40D3328A08D: removed
    Jul 22 08:15:18 artvin postfix/pipe[22518]: 7E87928A091: to=, relay=dovecot, delay=0.06, delays=0.03/0/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service)
    Jul 22 08:15:18 artvin postfix/qmgr[3578]: 7E87928A091: removed




    And astaro live log:

    2010:07:22-08:11:04 security exim[16858]: 2010-07-22 08:11:04 exim 4.69 daemon started: pid=16858, no queue runs, listening for SMTP on port 25 (IPv4) port 587 (IPv4) and for SMTPS on port 465 (IPv4)
    
    2010:07:22-08:12:00 security exim[16982]: 2010-07-22 08:12:00 Start queue run: pid=16982
    2010:07:22-08:12:00 security exim[16982]: 2010-07-22 08:12:00 End queue run: pid=16982
    2010:07:22-08:13:00 security exim[17105]: 2010-07-22 08:13:00 Start queue run: pid=17105
    2010:07:22-08:13:00 security exim[17105]: 2010-07-22 08:13:00 End queue run: pid=17105
    2010:07:22-08:14:00 security exim[17130]: 2010-07-22 08:14:00 Start queue run: pid=17130
    2010:07:22-08:14:00 security exim[17130]: 2010-07-22 08:14:00 End queue run: pid=17130
    2010:07:22-08:15:00 security exim[17201]: 2010-07-22 08:15:00 Start queue run: pid=17201
    2010:07:22-08:15:00 security exim[17201]: 2010-07-22 08:15:00 End queue run: pid=17201
    2010:07:22-08:15:46 security exim[16858]: 2010-07-22 08:15:46 SMTP connection from [79.123.252.51]:34691 (TCP/IP connection count = 1)
    2010:07:22-08:15:48 security exim[17438]: 2010-07-22 08:15:48 SMTP connection from ns1.artvin.edu.tr (posta.artvin.edu.tr) [79.123.252.51]:34691 closed by QUIT
    2010:07:22-08:16:00 security exim[17453]: 2010-07-22 08:16:00 Start queue run: pid=17453
    2010:07:22-08:16:00 security exim[17453]: 2010-07-22 08:16:00 End queue run: pid=17453
    2010:07:22-08:17:00 security exim[17533]: 2010-07-22 08:17:00 Start queue run: pid=17533
    2010:07:22-08:17:00 security exim[17533]: 2010-07-22 08:17:00 End queue run: pid=17533
    2010:07:22-08:18:00 security exim[17746]: 2010-07-22 08:18:00 Start queue run: pid=17746
    2010:07:22-08:18:00 security exim[17746]: 2010-07-22 08:18:00 End queue run: pid=17746
    2010:07:22-08:19:00 security exim[17823]: 2010-07-22 08:19:00 Start queue run: pid=17823
    2010:07:22-08:19:00 security exim[17823]: 2010-07-22 08:19:00 End queue run: pid=17823 


    I added security.artvin.edu.tr to postfix conf as a relayhost.
  • When this works correctly, your mail server won't be in direct communication with other servers.  Are you certain the IP of the the Astaro's "Internal (Address)" is designated as its smart host?  It looks to me like your mailserver is communicating directly with the outside world either through packet filters or is not even "behind" the Astaro.

    I'm concerned about your naming choices, and about this log line:
    2010:07:22-08:15:48 security exim[17438]: 2010-07-22 08:15:48 SMTP connection from ns1.artvin.edu.tr (posta.artvin.edu.tr) [79.x.y.51]:34691 closed by QUIT

    According to public DNS records posta.artvin.edu.tr resolves to 79.x.y.51; that means that your Astaro should have 79.x.y.51 as the primary IP on the External interface with a default gateway.  Your mailserver should have a private IP.  I would have expected something like:

    Host defintion for "Mailserver1" = 10.20.30.21

    'Hostlist' on the 'Routing' tab contains: Mailserver

    'Host-based relay'. on the 'Relaying' tab contains: Mailserver



    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I have changed our MX record so posta.artvin.edu.tr points to astaro's ip now.

    With the above configs (one shown in the last pics) My mails can be send but the falling to spam issue continues. posta.artvin.edu.tr also resolves to astaro's ip via reverse dns query.

    Gmail labels our mails as spam. But before, mx.astaro.com was rejecting our mails with the following error:    SMTP error from remote mail server after RCPT TO::
       host mx.astaro.com [213.144.15.13]: 550 No RDNS entry for 79.123.255.2

    Now our mails seems to be accepted as we dont get any delivery errors. Maybe google marked our domain as a spam source?

    As posta.artvin.edu.tr points to astaro, our webmail's pop3 client stopped to worked now. It complains that it cannot connect to pop3 server. If I configure it to use the ip address of the mail server instead of posta.artvin.edu.tr, it works as expected. But I want the pop3 traffic to flow via astaro. How can I configure POP3 proxy in astaro so I can use posta.artvin.edu.tr in webmails config as a pop3 server?
  • Maybe google marked our domain as a spam source?

    I believe that is the case.

    But I want the pop3 traffic to flow via astaro. 

    The Astaro POP3 Proxy is a "client" proxy - it protects emails coming from the POP3 server, not emails received by it.  There may be a way to have Astaro do some protection for you.  Is this mail server Exchange also doing POP3?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA