roehling / postsrsd

Postfix Sender Rewriting Scheme daemon
326 stars 39 forks source link

Gmail silently discarding email despite me using postsrsd? #10

Closed ovizii closed 10 years ago

ovizii commented 10 years ago

Hi there,

I just realized that Gmail has been silently discarding several of my root emails over the past few days mostly containing stats and log checks and the likes coming from my server.

Basically in my /etc/aliases file most of the system accounts redirect to root and root redirects to my Google Apps email address (ovidiu at pacura dot ru)

Here is an excerpt from my log file:

(1:539)# cat /var/log/mail.log | grep E3E844240CE

May 21 00:12:26 h2118175 postfix/cleanup[458751]: E3E844240CE: message-id=20140520221225.081274240AF@h2118175.stratoserver.net May 21 00:12:27 h2118175 postfix/local[458773]: CF3CB4240A3: to=root@h2118175.stratoserver.net, relay=local, delay=0.15, delays=0.08/0/0/0.07, dsn=2.0.0, status=sent (forwarded as E3E844240CE) May 21 00:12:27 h2118175 postfix/qmgr[351027]: E3E844240CE: from=root@h2118175.stratoserver.net, size=15088, nrcpt=1 (queue active) May 21 00:12:27 h2118175 postfix/smtp[458775]: E3E844240CE: to=ovidiu@pacura.ru, orig_to=root@h2118175.stratoserver.net, relay=aspmx.l.google.com[74.125.143.26]:25, delay=0.85, delays=0.07/0/0.16/0.61, dsn=5.7.1, status=bounced (host aspmx.l.google.com[74.125.143.26] said: 550-5.7.1 [85.214.221.98 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. cq10si18502940lad.77 - gsmtp (in reply to end of DATA command)) May 21 00:12:28 h2118175 postfix/bounce[458908]: E3E844240CE: sender non-delivery notification: EAC784240AF May 21 00:12:28 h2118175 postfix/qmgr[351027]: E3E844240CE: removed

And if you visit the link they give: https://support.google.com/mail/answer/175365?hl=en

It says: We recommend that you do not change the envelope sender when forwarding email to Gmail.

What is happening here? Any help would be much appreciated.

roehling commented 10 years ago

I don't see any log entries from postsrsd in your excerpt. All I can say is that I have been forwarding SRS rewritten mails to Gmail for several years without problems. Either you are indeed a spammer, or your server is misconfigured in some way.

ovizii commented 10 years ago

:-) I can assure you, I am not a spammer. And my server is configured properly since Google only started dropping my system generated emails recently so I'm sure there is just an error or misunderstanding on my part happening here hence my question here to you :-)

I can show another excerpt to show you SRS is working fine:

May 21 10:53:01 h2118175 postfix/smtpd[650681]: connect from smtprelay03.ispgateway.de[80.67.31.37] May 21 10:53:01 h2118175 postfix/policyd-weight[574237]: decided action=PREPEND X-policyd-weight: using cached result; rate:hard: -7; from=sender@kurus-english.com to=recipient@sa-tax.co.za; delay: 0s May 21 10:53:01 h2118175 postgrey[3279]: action=pass, reason=triplet found, client_name=smtprelay03.ispgateway.de, client_address=80.67.31.37, sender=sender@kurus-english.com, recipient=recipient@sa-tax.co.za May 21 10:53:01 h2118175 postfix/smtpd[650681]: AF58B424081: client=smtprelay03.ispgateway.de[80.67.31.37] May 21 10:53:01 h2118175 postfix/cleanup[650696]: AF58B424081: message-id=CALiNNX49WNBpZ9MqqjVvgwcsS1QSNmLH66h0qpo+gjSbbaynkQ@mail.gmail.com May 21 10:53:01 h2118175 postfix/qmgr[641790]: AF58B424081: from=sender@kurus-english.com, size=9286, nrcpt=1 (queue active) May 21 10:53:01 h2118175 postfix/smtpd[650681]: disconnect from smtprelay03.ispgateway.de[80.67.31.37] May 21 10:53:02 h2118175 postfix/smtpd[649261]: connect from localhost[127.0.0.1] May 21 10:53:02 h2118175 postfix/smtpd[649261]: 5B0874240AF: client=localhost[127.0.0.1] May 21 10:53:02 h2118175 postsrsd[650716]: srs_forward: sender@kurus-english.com rewritten as SRS0+Gclo=2T=kurus-english.com=sender@h2118175.stratoserver.net May 21 10:53:02 h2118175 postfix/cleanup[650696]: 5B0874240AF: message-id=CALiNNX49WNBpZ9MqqjVvgwcsS1QSNmLH66h0qpo+gjSbbaynkQ@mail.gmail.com May 21 10:53:02 h2118175 postfix/smtpd[649261]: disconnect from localhost[127.0.0.1] May 21 10:53:02 h2118175 postfix/qmgr[641790]: 5B0874240AF: from=SRS0+Gclo=2T=kurus-english.com=sender@h2118175.stratoserver.net, size=9775, nrcpt=1 (queue active) May 21 10:53:02 h2118175 amavis[647467]: (647467-04) Passed CLEAN {RelayedInbound}, [80.67.31.37]:47922 [209.85.219.50] sender@kurus-english.com -> recipient@sa-tax.co.za, Queue-ID: AF58B424081, Message-ID: CALiNNX49WNBpZ9MqqjVvgwcsS1QSNmLH66h0qpo+gjSbbaynkQ@mail.gmail.com, mail_id: cMq30kpPVEUw, Hits: -1.899, size: 9286, queued_as: 5B0874240AF, 607 ms May 21 10:53:02 h2118175 postfix/smtp[650699]: AF58B424081: to=recipient@sa-tax.co.za, relay=127.0.0.1[127.0.0.1]:10024, delay=0.77, delays=0.16/0/0/0.61, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5B0874240AF) May 21 10:53:02 h2118175 postfix/qmgr[641790]: AF58B424081: removed May 21 10:53:02 h2118175 dovecot: lda(recipient@sa-tax.co.za): sieve: msgid=CALiNNX49WNBpZ9MqqjVvgwcsS1QSNmLH66h0qpo+gjSbbaynkQ@mail.gmail.com: stored mail into mailbox 'INBOX' May 21 10:53:02 h2118175 postfix/pipe[650718]: 5B0874240AF: to=recipient@sa-tax.co.za, relay=dovecot, delay=0.25, delays=0.08/0/0/0.17, dsn=2.0.0, status=sent (delivered via dovecot service) May 21 10:53:02 h2118175 postfix/qmgr[641790]: 5B0874240AF: removed

I'm just wondering if what I explained is correct?

i.e. having something this in my /etc/aliases and after editing I ran: newaliases

clamav: root www-data: root amavis: root logcheck: root root: ovidiu@pacura.ru

So I was wondering why the usual emails sent out daily at midnight from root to root are now all of a sudden being dropped by Gmail. Is postsrsd not handling those emails? Do you have maybe a cronjob that sends its output to root so you can check how this looks on one of your servers?

BTW did you see this link they give: https://support.google.com/mail/answer/175365?hl=en

It says: We recommend that you do not change the envelope sender when forwarding email to Gmail. Are they saying: don't use SRS?

roehling commented 10 years ago

They say: don't use SRS if you are not willing to accept full responsibility for the forwarded mail content. Any forwarded spam will be associated with your server's domain. My guess is that the stratoserver.net domain has a poor reputation to begin with. You'd be better off relocating your server to your own domain.

The rejected cronjob mails are not rewritten because they are already originating from h2118175.stratoserver.net.

None of this seems to be a postsrsd issue.

ovizii commented 10 years ago

Gee, you're really defensive :-) I'm not blaming you or postsrsd for anything, I was just trying to understand. I'm sorry if I expressed myself incorrectly maybe?

I just thought I'd ask you about this since postsrsd deals with forwarding and rewriting and indeed you explained that the system mails aren't rewritten because they are originating from the server already.

Anyway, thanks for the help, I think the real pointer was when you said that the "root" domain provided by my server provider might have a bad reputation. I've checked with senderbase and indeed a lot of servers hosted at Strato (hence stratoserver.net) have a bad reputation. Mine is good but I guess it gets tainted by the bad neighbourhood.

I'l look into using my own hostname or maybe switching hosting providers altogether...

Thanks for taking a look and helping.

roehling commented 10 years ago

I am not trying to be defensive, I simply have neither the time nor the skill to diagnose your mail setup. Apologies if that seemed rude.

ovizii commented 10 years ago

No worries, you already helped me. Thanks for postsrsd, its working well and reliably.