PDA

View Full Version : Deny email of sends with a domain that doesn't resolve



wdv
07-28-2004, 01:51 PM
Hi,

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

Wouter

nobaloney
07-28-2004, 08:25 PM
The SpamBlocker version of exim.conf, available here (http://www.nobaloney.net/downloads/spamblocker/DirectAdmin/), includes this functionality by default.

If you want the functionality but don't want to use the SpamBlocker, then add this 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

wdv
07-29-2004, 07:24 AM
Thanks, one other question:

How can I view the mail queue?

nobaloney
07-29-2004, 08:02 AM
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

wdv
07-29-2004, 08:56 AM
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?

nobaloney
07-29-2004, 09:07 AM
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 (http://www.exim.org/).

Jeff

wdv
07-29-2004, 10:06 AM
# exim -bp

just gives nothing :(

Quite weird. I'll use the workaround then.