Originally Posted by minhnghivn
Try adding the following to your main.cf:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
This help prevents any one from sending mail through your server without logging in first.
Bingo! I had this problem and your suggestion (minhnghivn) has resolved it completely
I added this: reject_unknown_sender_domain
For me, my legit email was mostly working normally, but there was also a significant volume of junk mail (most of which was being rejected) trying to be sent through my server, visible in /var/log/mail.log The high volume of email attempts were all rejected, but the problem was that lots of this junk was being queued (only to be rejected again) and then after a couple weeks my mail server would stop delivering mail. Periodic reboots would resolve problem. But now the problem is eliminated... Basically I think I set up postfix improperly to begin with.
shows a list of files in queue (for me all the addresses in there looked spammy; confirmed the issue)
I ran the suggestions made by minh, then I did: postfix reload
Then I ran: postsuper -d ALL
to delete all the items in queue
Then I monitored the mail log for awhile and found that my legit email was goin thru properly but the spammy stuff was no longer showing up in log:
tail /var/log/mail.log -n 100
Thanks for help! (from Canada)
Also, thanks to Falko for your great tutorials, I have used them for years