
24th August 2009, 15:43
|
|
Member
|
|
Join Date: Oct 2008
Location: Ljubljana, Slovenia
Posts: 58
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Blacklist outgouing mail
Hi,
A major Slovenian free e-mail provider has recently gone bust. As a result, thousands of outgoing e-mails are being deferred in our server's mail logs, as some of the hosted sites still try to send e-mail to these addresses.
Is there a way to tell postfix (through ISPConfig if possible) to completely ignore any e-mail being sent out, whose recipient belongs to a certain domain? Postfix should not try to send such messages and if possible, not even log the attempt.
I tried adding a record to "Email > Global Filters > Postfix Blacklist" with "@offending-domain.tld" as Blacklist Address and Recipient as Type. This doesn't seem to have the desired effect though.
|

24th August 2009, 19:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Try this:
add a email route / (transport) in ispconfig with:
domain: offending-domain.tld
type: error
destination: This email address does not exist anymore.
|
|
The Following User Says Thank You to till For This Useful Post:
|
MrM (24th August 2009)
|

24th August 2009, 20:45
|
|
Member
|
|
Join Date: Oct 2008
Location: Ljubljana, Slovenia
Posts: 58
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by till
Try this:
add a email route / (transport) in ispconfig with:
domain: offending-domain.tld
type: error
destination: This email address does not exist anymore.
|
Thanks, till. It worked. The messages no longer go to the queue. However, quite a lot of entries are still added to the logs for a single message:
Code:
Aug 24 20:32:34 prod postfix/pickup[8518]: 4D0F51CF1F2: uid=0 from=<root>
Aug 24 20:32:34 prod postfix/cleanup[8551]: 4D0F51CF1F2: message-id=<20090824183234.4D0F51CF1F2@hostname.server-domain.tld>
Aug 24 20:32:34 prod postfix/qmgr[8520]: 4D0F51CF1F2: from=<root@hostname.server-domain.tld>, size=316, nrcpt=1 (queue active)
Aug 24 20:32:34 prod postfix/error[8554]: 4D0F51CF1F2: to=<mailbox@offending-domain.tld>, relay=none, delay=0.12, delays=0.09/0.01/0/0.01, dsn=5.0.0, status=bounced ([This email address does not exist anymore.])
Aug 24 20:32:34 prod postfix/cleanup[8551]: 5C5851CF1F3: message-id=<20090824183234.5C5851CF1F3@hostname.server-domain.tld>
Aug 24 20:32:34 prod postfix/qmgr[8520]: 5C5851CF1F3: from=<>, size=2025, nrcpt=1 (queue active)
Aug 24 20:32:34 prod postfix/bounce[8555]: 4D0F51CF1F2: sender non-delivery notification: 5C5851CF1F3
Aug 24 20:32:34 prod postfix/qmgr[8520]: 4D0F51CF1F2: removed
Aug 24 20:32:34 prod postfix/cleanup[8551]: 654221CF1EA: message-id=<20090824183234.5C5851CF1F3@hostname.server-domain.tld>
Aug 24 20:32:34 prod postfix/qmgr[8520]: 654221CF1EA: from=<>, size=2162, nrcpt=1 (queue active)
Aug 24 20:32:34 prod postfix/local[8556]: 5C5851CF1F3: to=<root@hostname.server-domain.tld>, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 654221CF1EA)
Aug 24 20:32:34 prod postfix/qmgr[8520]: 5C5851CF1F3: removed
It looks like the message gets bounced now. Is it possible to send it to /dev/null instead? It's not a big problem if this is not possible. Getting all those messages out of the queue was my first priority. Completely ignoring them would be a better option, but as I said, not strictly necessary.
|

25th August 2009, 02:45
|
|
Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 63
Thanks: 26
Thanked 11 Times in 10 Posts
|
|
Quote:
Originally Posted by MrM
..completely ignoring them would be a better option, but as I said, not strictly necessary.
|
Take a look at postfix restrictions parameters .. expecially at "reject_unknown_recipient_domain"
Requirements: the dns (mx or a) records of that provider domain must no longer exist.
If it suits your needs you will able ( modding your /etc/postfix/main.cf ) to do the trick in a better way ..you can avoid to receive the entire messages before dropping them (blocking them at smtp first dialog level) .. saving bandwith :-)
Bye..
bajodel.
|

25th August 2009, 03:09
|
|
Member
|
|
Join Date: Oct 2008
Location: Ljubljana, Slovenia
Posts: 58
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by bajodel
Take a look at postfix restrictions parameters .. expecially at "reject_unknown_recipient_domain"
Requirements: the dns (mx or a) records of that provider domain must no longer exist.
|
In this case, the MX record still exists, but the SMTP server is no longer responding, so I guess this option will not help.
The provider in question is actually email.si:
Code:
$ dig email.si IN MX
...
;; ANSWER SECTION:
email.si. 3421 IN MX 20 mx5.email.si.
$ telnet mx5.email.si 25
Trying 81.24.97.24...
telnet: Unable to connect to remote host: Connection timed out
Quote:
Originally Posted by bajodel
If it suits your needs you will able ( modding your /etc/postfix/main.cf ) to do the trick in a better way ..you can avoid to receive the entire messages before dropping them (blocking them at smtp first dialog level) .. saving bandwith :-)
|
Heh, bandwidth actually isn't a problem in this case, since the postfix server is only being used by the websites running on the same server. I was only hoping to get rid of the log entries and bounced messages, but as I said before, it's just a minor annoyance, not a serious issue. The bulk of the problem has already been solved with till's suggestion.
|

25th August 2009, 03:51
|
|
Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 63
Thanks: 26
Thanked 11 Times in 10 Posts
|
|
Quote:
Originally Posted by MrM
In this case, the MX record still exists ..[CUT]..
|
Ok.. it's not so clean ..but you can 'cook' fake ones :-) configuring that domain in your dns with a TEXT record only.
Postfix will look at MX and A records -> not present -> reject
Quote:
Originally Posted by MrM
..[CUT].. bandwidth actually isn't a problem in this case ..[CUT]..
|
Ok.. maybe it is not a problem for you, but it could be usefull for others..
Bye..
bajodel.
|
|
The Following User Says Thank You to bajodel For This Useful Post:
|
MrM (27th August 2009)
|

27th August 2009, 00:27
|
|
Member
|
|
Join Date: Oct 2008
Location: Ljubljana, Slovenia
Posts: 58
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by bajodel
Ok.. it's not so clean ..but you can 'cook' fake ones :-) configuring that domain in your dns with a TEXT record only.
Postfix will look at MX and A records -> not present -> reject
|
I'll do that. Thanks for the idea.
Quote:
Originally Posted by bajodel
Ok.. maybe it is not a problem for you, but it could be usefull for others..
|
You're right. Sorry if I sounded ungrateful.
Thanks, till and bajodel, for helping out.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 08:50.
|
|
Recent comments
7 hours 29 min ago
12 hours 34 min ago
16 hours 58 min ago
18 hours 47 min ago
1 day 8 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 22 hours ago