Page 1 of 1

Check RBL on second ip address in message header

Posted: 04 Jan 2021 19:13
by victorburgos
Hi, I have some messages that are not being filtered with RBL on the second ip in message header-
  • I have spam lists enabled:
mailscanner spam lists.png
mailscanner spam lists.png (7.32 KiB) Viewed 3733 times
Many spam messages are not being filtered because the last ip on the header is not on any RBL.
However, if I check the second IP address, this one is listed on spamhaus, see next image:
mailscanner 2 ips on message header.png
mailscanner 2 ips on message header.png (40.31 KiB) Viewed 3733 times
In the end, the message arrives to the user even when 1 ip on the headers is listed on spamhaus:
x spam status no.png
x spam status no.png (49.16 KiB) Viewed 3733 times
I would like to know if mailscanner checks all ip addresses on the message header for RBLs or just the last ip.
If only the last ip address is checked, how can I enable checks on second and third ips on headers?

Thanks in advance for your help.

Re: Check RBL on second ip address in message header

Posted: 04 Jan 2021 21:07
by henk
in MailScanner.conf

If you do have another MTA between "the net" and your MS box, then you
really do need set this to 2.

Code: Select all

Read IP Address From Received Header = 2
P.S.
When using fetchmail, the first IP is always 127.0.0.1
Use the --invisible option to deal with that

The big question: What if you have muliple IP's, or just one in .....

Re: Check RBL on second ip address in message header

Posted: 05 Jan 2021 01:10
by victorburgos
Thank you Henk, this would have taken me hours to figure out. :clap:

Re: Check RBL on second ip address in message header

Posted: 05 Jan 2021 07:58
by pdwalker
henk wrote: 04 Jan 2021 21:07 in MailScanner.conf

If you do have another MTA between "the net" and your MS box, then you
really do need set this to 2.
huh. I didn't know that one, and I needed it. Thanks!