mainarea
10-31-2002, 04:25 PM
My WHM/CPanel server sends out a lot of emails, and I get a whole bunch of returned emails, and "account not active", etc... (no, it's not spam, it's for http://www.ukee.com and http://www.friendq.com ) to the address nobody@(serverhostname).com . I have messages to this address in the mail queue for 21 hours - is there any way to either:
a. clear all messages to "nobody@serverhostname" out of the queue
or
b. discard them automatically when they enter the queue?
Thanks,
Matt
creature
10-31-2002, 08:21 PM
Originally posted by mainarea
My WHM/CPanel server sends out a lot of emails, and I get a whole bunch of returned emails, and "account not active", etc... (no, it's not spam, it's for http://www.ukee.com and http://www.friendq.com ) to the address nobody@(serverhostname).com . I have messages to this address in the mail queue for 21 hours - is there any way to either:
a. clear all messages to "nobody@serverhostname" out of the queue
or
b. discard them automatically when they enter the queue?
Thanks,
Matt
Depending on what you use for mail server software (sendmail, iMail, Post.Office), you can do a couple things. With sendmail it's pretty easy to come up with a script to run parse the messages in the queue and anything with "nobody@*.*" you just rm out of existance. You can effectively do the same for most other mail programs on Unix.
CipherVendor
10-31-2002, 08:36 PM
Since cpanel uses Exim, you can setup vfilter rules in /etc/vfilters/domainname.com to kill any email which contains certain variables.
Example:
if $header_from: contains "nobody" or
$header_subject: contains "return to sender"
then
save /dev/null
endif
You can also reduce the time frozen messages are kept in the mail queue from 7 days to x days.
mainarea
10-31-2002, 09:00 PM
The email address that the emails are getting returned to is nobody@server1.domain1.com . The server's mail hostname is server1.domain1.com, so there is no file in the vfilters directory with that host name. Should I just create a file?
- Matt
mainarea
10-31-2002, 09:13 PM
I tried creating server1.domain1.com with that example (and a modified version of it), but it didn't work. Any other suggestions?
- Matt
mainarea
10-31-2002, 10:35 PM
Just redirect nobody's mail to /dev/null
-Nick
Well, that solves it!