Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure Mailu to reject instead of bounce #583

Closed
xudonax opened this issue Aug 29, 2018 · 2 comments
Closed

Unable to configure Mailu to reject instead of bounce #583

xudonax opened this issue Aug 29, 2018 · 2 comments
Labels
priority/p2 Minor bug / Could have type/enhancement Enhances existing functionality

Comments

@xudonax
Copy link

xudonax commented Aug 29, 2018

I'm having a spam issue in that I'm getting ~250.000 spam mails and mailu is bouncing them all. This got me on some spam lists so I'm looking into sending a reject to the server that's sending them to me instead of sending a bounce to the FROM address. As far as I can see this is not (yet) configurable. How would I do this?

At the moment my logs are littered with messages like smtp_1 | 2018-08-22T07:30:18.130405545Z postfix/smtp[137]: 73EBC8B09: to=<some-random-address@yahoo.com.tw>, relay=mx-tw.mail.gm0.yahoodns.net[180.222.103.9]:25, delay=29, delays=17/0.03/12/0.24, dsn=4.7.0, status=deferred (host mx-tw.mail.gm0.yahoodns.net[180.222.103.9] said: 421 4.7.0 [TSS04] Messages from 94.142.240.35 temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html (in reply to MAIL FROM command)) which lead me to believe this is a bounce message being sent. The domain yahoo.com.tw is not in my configuration and I'm certainly not trying to send mails there.

@xudonax
Copy link
Author

xudonax commented Sep 2, 2018

This seems to be fixed by adding -o smtpd_reject_unlisted_recipient=yes to the master.cf file at line 10, making the file look like this:

# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)

# Exposed SMTP service
smtp      inet  n       -       n       -       -       smtpd

# Internal SMTP service
10025     inet  n       -       n       -       -       smtpd
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_recipient_restrictions=reject_unlisted_sender,reject_sender_login_mismatch,permit
  -o smtpd_reject_unlisted_recipient=yes
  -o cleanup_service_name=outclean
outclean  unix n       -       n       -       0       cleanup
  -o header_checks=pcre:/etc/postfix/outclean_header_filter.cf

# Internal postfix services
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache

@kaiyou kaiyou added enhancement priority/p2 Minor bug / Could have type/enhancement Enhances existing functionality and removed enhancement labels Sep 28, 2018
ofthesun9 pushed a commit to ofthesun9/Mailu that referenced this issue Oct 4, 2018
ofthesun9 pushed a commit to ofthesun9/Mailu that referenced this issue Oct 4, 2018
ofthesun9 pushed a commit to ofthesun9/Mailu that referenced this issue Oct 4, 2018
mergify bot added a commit that referenced this issue Oct 6, 2018
…recipient

Add variable to choose whether to bounce or reject email when recipient is unknown. Fixes #583
@ofthesun9
Copy link
Contributor

Closed with #626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/p2 Minor bug / Could have type/enhancement Enhances existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants