Disable adding own hostname to sender's address

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Disable adding own hostname to sender's address

Bernd Wurst
Hello.

Courier adds it's own hostname to From- and To-Headers when they are
syntactically broken.

This is documented in courier man page at "defaultdomain". But I did not
find a way to avoid that. If I leave this file away, the "me" file is used.

What I want:
Sent mail from local users (via sendmail CLI) should have the hostname
appended. But mail from remote (spam) should not.

Is this possible?


Sincerely,
Bernd


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Michelle Konzack
Hello Bernd,

On 2017-01-23 07:38:30 Bernd Wurst hacked into the keyboard:
> What I want:
> Sent mail from local users (via sendmail CLI) should have the hostname
> appended. But mail from remote (spam) should not.

I have the same problem here since some years and could not figure  out,
how to avoid it.  Rejecting mails with "forgotten"  domain  name  whould
reject arround 20-40.000 spams per day on my mailserver.

Have a nice day

--
Michelle Konzack        ITSystems
GNU/Linux Developer     0033-6-61925193

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Sam Varshavchik
Michelle Konzack writes:

> Hello Bernd,
>
> On 2017-01-23 07:38:30 Bernd Wurst hacked into the keyboard:
> > What I want:
> > Sent mail from local users (via sendmail CLI) should have the hostname
> > appended. But mail from remote (spam) should not.
>
> I have the same problem here since some years and could not figure  out,
> how to avoid it.  Rejecting mails with "forgotten"  domain  name  whould
> reject arround 20-40.000 spams per day on my mailserver.
Adding

NOADDRREWRITE=2

to the courieresmtpd configuration file should do the trick.

The documentation for this is buried in the submit(8) man page.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Michelle Konzack
On 2017-01-23 06:33:48 Sam Varshavchik hacked into the keyboard:
> Adding
>
> NOADDRREWRITE=2
>
> to the courieresmtpd configuration file should do the trick.

Hmmm, even if I do not find ths OPTION in any manpages, I have added it
to /etc/courier/esmtpd and will see, what happen.

I will see, if I still get messages from <jfk53> and <jfc53>...

Oops!  --  Just restarted esmtpd and now I get

----[ ssh command ]-----------------------------------------------------
Jan 23 16:13:23 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:13:24 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="554 Syntax error - your mail software violates RFC 821.",cmd: MAIL FROM: [hidden email]
Jan 23 16:13:55 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:13:58 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:14:28 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:14:31 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:02 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:05 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:15 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:18 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:18 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:21 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:32 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:34 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:45 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:48 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:15:48 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:15:51 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:01 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:04 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:05 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:07 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:08 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:11 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:21 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:24 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:24 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:27 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:48 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:50 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:51 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:54 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:16:54 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:16:57 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:07 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:10 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:10 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:13 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:14 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:16 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:17 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:20 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:20 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:23 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:23 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:26 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:17:26 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:17:29 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:00 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:03 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:03 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:06 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:06 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:09 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:19 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:22 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:33 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:35 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:36 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:39 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:49 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:54 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:18:55 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:18:57 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:18 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:21 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:21 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:24 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:24 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:27 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:28 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:30 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:31 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:34 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:44 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:19:47 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:19:57 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:02 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:03 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:05 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:16 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:19 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:19 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:22 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:42 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:47 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:47 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:50 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:51 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:55 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:20:55 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:20:58 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:21:19 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:21:22 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:21:32 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:21:35 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:21:35 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
Jan 23 16:21:40 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535 Authentication failed.",cmd: AUTH
Jan 23 16:21:51 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
...
-------------------------------------------------------------------------

Is this a result of  NOADDRREWRITE=2  ?

> The documentation for this is buried in the submit(8) man page.

...but not in my manpage!


--
Michelle Konzack        ITSystems
GNU/Linux Developer     0033-6-61925193

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Gordon Messmer-2
On 01/23/2017 08:08 AM, Michelle Konzack wrote:
The documentation for this is buried in the submit(8) man page.
...but not in my manpage!


What version are you running?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Sam Varshavchik
In reply to this post by Michelle Konzack
Michelle Konzack writes:

> On 2017-01-23 06:33:48 Sam Varshavchik hacked into the keyboard:
> > Adding
> >
> > NOADDRREWRITE=2
> >
> > to the courieresmtpd configuration file should do the trick.
>
> Hmmm, even if I do not find ths OPTION in any manpages, I have added it
> to /etc/courier/esmtpd and will see, what happen.
>
> I will see, if I still get messages from <jfk53> and <jfc53>...
>
> Oops!  --  Just restarted esmtpd and now I get
>
> ----[ ssh command ]-----------------------------------------------------
> Jan 23 16:13:23 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
> Jan 23 16:13:24 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="554  
> Syntax error - your mail software violates RFC 821.",cmd: MAIL FROM:  
> [hidden email]
> Jan 23 16:13:55 mail courieresmtpd: started,ip=[::ffff:202.170.70.8]
> Jan 23 16:13:58 mail courieresmtpd: error,relay=::ffff:202.170.70.8,msg="535  
> Authentication failed.",cmd: AUTH
The config change has no effect on authentication.

You're logging a run-of-the-mill dictionary attack.

> Is this a result of  NOADDRREWRITE=2  ?

No.

>
> > The documentation for this is buried in the submit(8) man page.
>
> ...but not in my manpage!

Changelog shows that the option was added in 0.70, in January of 2013.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Bernd Wurst
In reply to this post by Sam Varshavchik
Hi.

Am 23.01.2017 um 12:33 schrieb Sam Varshavchik:
> Adding
> NOADDRREWRITE=2
> to the courieresmtpd configuration file should do the trick.

Ah, thanks a lot for this pointer.

According to the man page, the value 1 seems more appropriate here as
everything > 1 is documented to DO a rewrite unless DKIM is used.

So I set it to 1 and first test seems to work.


Bernd


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disable adding own hostname to sender's address

Michelle Konzack
In reply to this post by Gordon Messmer-2
Hello Gordon,

On 2017-01-23 09:29:41 Gordon Messmer hacked into the keyboard:
> On 01/23/2017 08:08 AM, Michelle Konzack wrote:
> >>The documentation for this is buried in the submit(8) man page.
> >...but not in my manpage!
>
> What version are you running?

Debian Version 0.68.2-1

--
Michelle Konzack        ITSystems
GNU/Linux Developer     0033-6-61925193

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
[hidden email]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

signature.asc (853 bytes) Download Attachment