bluegroper
Technical User
I have an "off-line" postfix mailserver. It does a great job for a small and busy office.
Handles internal LAN email, as well as relaying outgoing email to the isp's mailserver.
/etc/postfix/main.cf includes the following line
Relayhost = mailserver.isp.com.
Incoming email is pulled from the isp using fetchmail, and handed on to postfix for local delivery. That works well.
I'm trying to use an access table to selectively bounce some emails.
Edited /etc/postfix/access, then postmap access to create access.db
Also postfix reload.
/etc/postfix/access contains the following line
myrealbox.com 550 Your unsolicited email is unwelcome. All email from your domain has been blocked.
Also using following line in main.cf
smtpd_sender_restrictions = hash:/etc/postfix/access
OK so far.
But when I send myself an email from myrealbox.com, it looks like fetchmail hands postfix the email which postfix tries to bounce, it gives the message back to fetchmail, who sends the bounced message to the postfix postmaster. Result is that the message is not bounced at all. Simply delivered to the postmaster.
Here's the log entries :
fetchmail: 1 message for user_name at mailserver.isp.com (1240 octets).
fetchmail: reading message 1 of 1 (1240 octets) fetchmail: SMTP error: 550 <user_name@myrealbox.com>: Sender address rejected: Your unsolicited email is unwelcome. All email from your domain has been blocked.
fetchmail: mail from FETCHMAIL-DAEMON@Fileserver bounced to postmaster@network.lan
fetchmail: can't even send to postmaster@network.lan!
fetchmail: flushed
How do I instruct postfix to send such rejected messages back via the relayhost defined above ?
Can it be done without taking my postfix server fully "on-line" to bounce my emails?
TIA's
ßG
Edit. Just using myrealbox.com for testing. Its a great no-spam, free email service.
Handles internal LAN email, as well as relaying outgoing email to the isp's mailserver.
/etc/postfix/main.cf includes the following line
Relayhost = mailserver.isp.com.
Incoming email is pulled from the isp using fetchmail, and handed on to postfix for local delivery. That works well.
I'm trying to use an access table to selectively bounce some emails.
Edited /etc/postfix/access, then postmap access to create access.db
Also postfix reload.
/etc/postfix/access contains the following line
myrealbox.com 550 Your unsolicited email is unwelcome. All email from your domain has been blocked.
Also using following line in main.cf
smtpd_sender_restrictions = hash:/etc/postfix/access
OK so far.
But when I send myself an email from myrealbox.com, it looks like fetchmail hands postfix the email which postfix tries to bounce, it gives the message back to fetchmail, who sends the bounced message to the postfix postmaster. Result is that the message is not bounced at all. Simply delivered to the postmaster.
Here's the log entries :
fetchmail: 1 message for user_name at mailserver.isp.com (1240 octets).
fetchmail: reading message 1 of 1 (1240 octets) fetchmail: SMTP error: 550 <user_name@myrealbox.com>: Sender address rejected: Your unsolicited email is unwelcome. All email from your domain has been blocked.
fetchmail: mail from FETCHMAIL-DAEMON@Fileserver bounced to postmaster@network.lan
fetchmail: can't even send to postmaster@network.lan!
fetchmail: flushed
How do I instruct postfix to send such rejected messages back via the relayhost defined above ?
Can it be done without taking my postfix server fully "on-line" to bounce my emails?
TIA's
ßG
Edit. Just using myrealbox.com for testing. Its a great no-spam, free email service.