Operating System - HP-UX
1831936 Members
3266 Online
110032 Solutions
New Discussion

sendmail 8.9.3 question ..

 
someone_4
Honored Contributor

sendmail 8.9.3 question ..

Hello has anyone used this fix for spamming?
Add the following lines to sendmail 8.8.6 sendmail.cf below the check_rcpt
line (don't forget to use tabs preceding the "$:" portion of each line):

Scheck_rcpt
R$* < $* > $* $: $1 $2 $3 remove angles
R$* @ $: $1 Strip an @ with no addr, user%host@
R@ $+ : $+ $: $>3 @ $1 : $2
R$- @ $+ $: $(dequote $1 $) @ $2 "user@host"@this.host
R$- $: $(dequote $1 $) "user@host@this.host
"



I cant get it to work .. I get the error:
/etc/mail/sendmail.cf: line 1872: dequote 1 "user@host@this.host... Unbalanced
'"'
/etc/mail/sendmail.cf: line 1876: unknown configuration line "this.host>""
553 /etc/mail/sendmail.cf: line 1872: dequote 1 "user@host@this.host... Unbala
nced '"'
554 /etc/mail/sendmail.cf: line 1876: unknown configuration line "ost@this.host>""

I have tried on sendmail 8.9.3 and sendmail 8.8.6. From my understanding this is the fix to stop people from spamming with the " " though telnet on port 25.

Richard





8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor

Re: sendmail 8.9.3 question ..

Richard,


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: sendmail 8.9.3 question ..

I should have been more specific. You broke the line and made them two. So " got unbalanced and " being a seperate line is getting interpreted as a sendmail rule.

so both the last two lines should be a single line.

Hope it helps,
Sri
You may be disappointed if you fail, but you are doomed if you don't try
Eugen Cocalea
Respected Contributor

Re: sendmail 8.9.3 question ..

Hi,

Are you sure you don't have an extra ">" here?

R@ $+ : $+ $: $>3 @ $1 : $2

E.
To Live Is To Learn
someone_4
Honored Contributor

Re: sendmail 8.9.3 question ..

I was able to start it now .. but now I cant relay anything from a valid client ..

in the script
R$* < $* > $* $: $1 $2 $3 remove angles
R$* @ $: $1 Strip an @ with no addr, user%host@
R@ $+ : $+ $: $>3 @ $1 : $2
R$- @ $+ $: $(dequote $1 $) @ $2 "user@host"@this.host
R$- $: $(dequote $1 $) "user@host@this.host
"

do I need to replace the user@host@this.host with my host?

Here is what I get on the client side ..
Relaying denied', Port: 25, Secure(SSL): No, Server Error: 550, Error Number: 0x800CCC79
Sridhar Bhaskarla
Honored Contributor

Re: sendmail 8.9.3 question ..

Richard,

This set of rules prohibits relaying which is by default with 8.9.3. If your server is intended to be relaying then you need to consider either taking it out or considering adding rulesets as described in the URL

http://www.sendmail.org/antispam.html

Check the line

FR-o /etc/sendmail.cR and the following lines

You can keep this file anywhere but need to point it in the sendmail.cf file as mentioned above.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
someone_4
Honored Contributor

Re: sendmail 8.9.3 question ..

Hey Sridhar ..
I got the rule to work .. on sendmail 8.8.6
and it works fine .. I get we do not relay when I try to spam though port 25. Now the the weird thing is .. I cant spam though our private interntal ip .. But I can still spam from the public ip (the one that matters). Why would that happened? I thoguht they would both act the same.

Richard
Sridhar Bhaskarla
Honored Contributor

Re: sendmail 8.9.3 question ..

Richard,

Check the second point in "notes" under the heading "Preventing Relay through your SMTP Port" in the same page. It has a pointer to

http://www.sendmail.org/antirelay.Parse0.txt

This may be what you are interested.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ralf Hildebrandt
Valued Contributor

Re: sendmail 8.9.3 question ..

Why are you torturing yourself with that bloody old version of sendmail.
If you MUST use sendmail, use the m4 method described on www.sendmail.org

The better alternative though, is to use postfix instead. HP uses it themselves.

http://www.postfix.org
what you want to do can be done in Postfix using:
allow_percent_hack = no

Was that easy or what?
Postfix/BIND/Security/IDS/Scanner, you name it...