Deny email of sends with a domain that doesn't resolve

wdv

Verified User
Joined
Oct 22, 2003
Messages
153
Hi,

Does anybody know how I can deny incoming emails which are being sent from domains which do not resolve?

Wouter
 
The SpamBlocker version of exim.conf, available here, includes this functionality by default.

If you want the functionality but don't want to use the SpamBlocker, then add this code:
Code:
# Deny unless sender address can be verified:
# This statement requires the sender address to be verified before any
# subsequent ACL statement can be used. If verification fails, the incoming
# recipient address is refused. Verification consists of trying to route the
# address, to see if a bounce message could be delivered to it. In the case of
# remote addresses, basic verification checks only the domain.

  require verify = sender
to the check_recipient acl, right under the line:

accept hosts = :

Jeff
 
Thanks, one other question:

How can I view the mail queue?
 
There's a standard convention that most MTAs follow; if called (as root) by the name mailq, exim will dump it's queue information to standard output:

# mailq

Then if you want to see all the files that make up the queue, you can find it (for example) this way:

ls -al /var/spool/exim/*/1BqCM7-0007wt-9V*

(for example)

where that "18qCM7-0007wt-9V" comes from the mailq output (adding the asterisks as shown so you can see all the files making up the email in the queue.

Jeff
 
mailq says that I have an empty queue, which is not true (got about 400 messages in /var/spool/exim/input)

Any idea why mailq is not working?
 
Nope, no idea :( .

Have you tried:

# exim -bp

Does it show anything different?

If you just want to delete those emails (if they're more than a day old they're most likely never going to be delivered, and are probably spams and viruses waiting to delivered to nonexistent addresses), you can turn off exim (do it from the control panel so it won't be turned back on), and then delete the emails in all the directories I mentioned in my last post, and then turn exim back on, also from the control panel.

If you really want a reason, it would be a great question to post to the exim-users list; see exim.org.

Jeff
 
# exim -bp

just gives nothing :(

Quite weird. I'll use the workaround then.
 
Back
Top