Operating System - HP-UX
1840517 Members
2391 Online
110165 Solutions
New Discussion

Re: Filter mail subject in Sendmail

 
SOLVED
Go to solution
Anthony khan
Frequent Advisor

Filter mail subject in Sendmail

Hi

Is there any way we can filter mail subject in Sendmail.
Thanks in advance

5 REPLIES 5
Kofi ARTHIABAH
Honored Contributor

Re: Filter mail subject in Sendmail

I think what you might be looking for is procmail:

http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/procmail-3.21/

good luck
nothing wrong with me that a few lines of code cannot fix!
Sridhar Bhaskarla
Honored Contributor

Re: Filter mail subject in Sendmail

You can use mail filtering packages like BCRMAIL etc

http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/BCRMail-3.14/



-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Christopher Caldwell
Honored Contributor
Solution

Re: Filter mail subject in Sendmail

Yes.

I've got this immediately after the check_relay ruleset in /etc/mail/sendmail.cf:

HSubject: $>Check_Subject
D{MPat}ILOVEYOU
D{MMsg}This message may contain the LoveLetter virus.
D{MPat7}Snowhite and the Seven Dwarfs - The REAL story
D{MMsg7}This message is infected with the W95.Hybris.gen virus. See http://www.
symantec.com.
# End Ruleset For WORM virus
# Ruleset for VBS virus
#D{MPat8}Here you have, ;o)
D{MPat8}Here you have
D{MMsg8}This message may be infected with the VBS/SST virus. See http://www.sym
antec.com.

SCheck_Subject
R${MPat} $* $#error $: 553 ${MMsg}
RRe: ${MPat} $* $#error $: 553 ${MMsg}
R${MPat7} $* $#error $: 553 ${MMsg7}
RRe: ${MPat7} $* $#error $: 553 ${MMsg7}
RFwd: ${MPat7} $* $#error $: 553 ${MMsg7}
R${MPat8} $* $#error $: 553 ${MMsg8}
RRe: ${MPat8} $* $#error $: 553 ${MMsg8}
RFwd: ${MPat8} $* $#error $: 553 ${MMsg8}

If you modify sendmail.cf, don't forget to stop sendmail (killsm) and restart it (/sbin/init.d/sendmail start).
Christopher Caldwell
Honored Contributor

Re: Filter mail subject in Sendmail

P.S. be very careful with spaces vs. tabs in sendmail.cf.
Sanjay_6
Honored Contributor

Re: Filter mail subject in Sendmail