Re: [OT] Why no envelope sender in RECEIVED?

2022-11-09 Thread MRob

On 2022-11-09 13:05, Bill Cole wrote:

On 2022-11-08 at 19:23:51 UTC-0500 (Wed, 09 Nov 2022 00:23:51 +)
MRob 
is rumored to have said:


Hello,

Why isnt it standard to put the envelope sender into the RECEIVED 
header?


Because it can change in transit in ways which can be confusing and
potentially reveal legitimately private information.


Can you xplain what is private about that? Thank you


Re: Can't get sender_dependent_relayhost_maps to work -- HELP!

2022-11-09 Thread Bryan Arenal
I got this working -- in the midst of the different iterations, I had
a mismatch in domains in sasl_passwd and relayhost_maps.  Once those
have been aligned, it's working as expected.

Thanks!

On Wed, Nov 9, 2022 at 1:20 PM Bryan Arenal  wrote:
>
> Hi there,
>
> I'm having issues with getting sender_dependent_relayhost_maps to work
> (Rocky Linux 8, postfix v3.5.8).  No matter what I try, it seems that
> the sender_dependent_relayhost_maps is being ignored.
>
> Here's my main.cf:
>
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> compatibility_level = 2
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
> ddd $daemon_directory/$process_name $process_id & sleep 5
> debug_peer_level = 2
> html_directory = no
> inet_interfaces = localhost
> inet_protocols = all
> mail_owner = postfix
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> meta_directory = /etc/postfix
> milter_default_action = accept
> mydestination = $myhostname, localhost.$mydomain, localhost
> newaliases_path = /usr/bin/newaliases.postfix
> non_smtpd_milters = $smtpd_milters
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix/README_FILES
> sample_directory = /usr/share/doc/postfix/samples
> sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> shlib_directory = /usr/lib64/postfix
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_security_options = noanonymous
> smtp_sender_dependent_authentication = yes
> smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
> smtp_tls_CApath = /etc/pki/tls/certs
> smtp_tls_security_level = may
> smtpd_milters = inet:localhost:8891
> smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem
> smtpd_tls_key_file = /etc/pki/tls/private/postfix.key
> smtpd_tls_security_level = may
> unknown_local_recipient_reject_code = 550
>
> Here's /etc/postfix/relayhost_maps:
>
> t...@example.com [smtp.office365.com]:587
>
> And /etc/postfix/sasl_passwd:
>
> [smtp.office365.com]:587  t...@example.com:mypasswd
>
> Followed by running 'postmap' on each.  /etc/postfix/relayhost_maps
> and /etc/postfix/sasl_passwd are owned by root:root and are 600 (the
> .db files are 644).  Postfix is also then restarted.
>
> But if I do a 'echo |mailx -s "Test" -r "t...@example.com"
> m...@example.com', it's delivered normally, seemingly ignoring the
> smtp_sender_dependent_authentication directive and the mapping to send
> through smtp.office365.com.  Unless the way I'm testing isn't the
> right way?  I've tried so many different iterations but I'm at a loss
> at this point.  There's nothing in syslog that provides any leads.
>
> Any help would be GREATLY appreciated!
>
> Thank you!


Can't get sender_dependent_relayhost_maps to work -- HELP!

2022-11-09 Thread Bryan Arenal
Hi there,

I'm having issues with getting sender_dependent_relayhost_maps to work
(Rocky Linux 8, postfix v3.5.8).  No matter what I try, it seems that
the sender_dependent_relayhost_maps is being ignored.

Here's my main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
milter_default_action = accept
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/README_FILES
sample_directory = /usr/share/doc/postfix/samples
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
shlib_directory = /usr/lib64/postfix
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_CApath = /etc/pki/tls/certs
smtp_tls_security_level = may
smtpd_milters = inet:localhost:8891
smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem
smtpd_tls_key_file = /etc/pki/tls/private/postfix.key
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550

Here's /etc/postfix/relayhost_maps:

t...@example.com [smtp.office365.com]:587

And /etc/postfix/sasl_passwd:

[smtp.office365.com]:587  t...@example.com:mypasswd

Followed by running 'postmap' on each.  /etc/postfix/relayhost_maps
and /etc/postfix/sasl_passwd are owned by root:root and are 600 (the
.db files are 644).  Postfix is also then restarted.

But if I do a 'echo |mailx -s "Test" -r "t...@example.com"
m...@example.com', it's delivered normally, seemingly ignoring the
smtp_sender_dependent_authentication directive and the mapping to send
through smtp.office365.com.  Unless the way I'm testing isn't the
right way?  I've tried so many different iterations but I'm at a loss
at this point.  There's nothing in syslog that provides any leads.

Any help would be GREATLY appreciated!

Thank you!


Re: [OT] Why no envelope sender in RECEIVED?

2022-11-09 Thread Bill Cole

On 2022-11-08 at 19:23:51 UTC-0500 (Wed, 09 Nov 2022 00:23:51 +)
MRob 
is rumored to have said:


Hello,

Why isnt it standard to put the envelope sender into the RECEIVED 
header?


Because it can change in transit in ways which can be confusing and 
potentially reveal legitimately private information.


The final envelope sender is USUALLY put into delivered mail as the 
Return-Path header. If not, fix your mail server.





--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: what's the usage of /etc/mailname

2022-11-09 Thread support
Thanks that works for me too.

btw, can anybody have interests in testing the mail system I am working on?
https://openmbox.net/

The account is for free registration.

regards
Henry

> 
> On Wed, 9 Nov 2022 at 12:59,  wrote:
> 
> > 
> > I am using mailutils from ubuntu 20.04
> >  And in main.cf myorigin points to the file /etc/mailname.
> >  But I don't see a config file /etc/mailutils.conf?
> > 
> 
> I didn't have a default config either. This is what is working for me:
> 
> program mail {
>  address {
>  # Set e-mail domain for unqualified user names (default is this host)
>  email-domain "host.example.com";
>  };
> };
> 
> -- 
>  bye, Marki
>


Re: what's the usage of /etc/mailname

2022-11-09 Thread Marek Podmaka
On Wed, 9 Nov 2022 at 12:59,  wrote:
>
> I am using mailutils from ubuntu 20.04
> And in main.cf myorigin points to the file /etc/mailname.
> But I don't see a config file /etc/mailutils.conf?

I didn't have a default config either. This is what is working for me:

program mail {
  address {
# Set e-mail domain for unqualified user names (default is this host)
email-domain "host.example.com";
  };
};



-- 
  bye, Marki


Re: what's the usage of /etc/mailname

2022-11-09 Thread support
I am using mailutils from ubuntu 20.04
And in main.cf myorigin points to the file /etc/mailname.
But I don't see a config file /etc/mailutils.conf? 

Thanks.


November 9, 2022 at 5:28 PM, "Marek Podmaka"  wrote:


> 
> On Wed, 9 Nov 2022 at 10:12,  wrote:
> 
> > 
> > When i send an email from terminal by "mail" commaind, the mail is sent via 
> > postfix installed on localhost, the sender address appears always as 
> > "u...@sdfsfsdf.example.org", not the expected "u...@example.org".
> > 
> 
> Depends on what that "mail" command is. For example Debian can have at
> least 2 different packages that provide some kind of "mail" command,
> each with different command-line options and configuration. I am
> currently using the package mailutils, which has a config file
> /etc/mailutils.conf, where you configure which domain to add when
> sending email via the "mail" command.
> 
> -- 
>  bye, Marki
>


Re: [OT] Why no envelope sender in RECEIVED?

2022-11-09 Thread Wietse Venema
MRob:
> Hello,
> 
> Why isnt it standard to put the envelope sender into the RECEIVED 
> header? Is some good reason to hide it?

Email protocols and formats are defined in RFCs. See RFC 5321 for SMTP.

Wietse


Re: what's the usage of /etc/mailname

2022-11-09 Thread Marek Podmaka
On Wed, 9 Nov 2022 at 10:12,  wrote:
>
> When i send an email from terminal by "mail" commaind, the mail is sent via 
> postfix installed on localhost, the sender address appears always as 
> "u...@sdfsfsdf.example.org", not the expected "u...@example.org".

Depends on what that "mail" command is. For example Debian can have at
least 2 different packages that provide some kind of "mail" command,
each with different command-line options and configuration. I am
currently using the package mailutils, which has a config file
/etc/mailutils.conf, where you configure which domain to add when
sending email via the "mail" command.


-- 
  bye, Marki


Re: what's the usage of /etc/mailname

2022-11-09 Thread Matus UHLAR - fantomas

On 09.11.22 09:12, supp...@openmbox.net wrote:

I have setup the domain in /etc/mailname, such as example.org.
but my hostname is something like sdfsfsdf.example.org.


When i send an email from terminal by "mail" commaind, the mail is sent via 
postfix installed on localhost, the sender address appears always as 
"u...@sdfsfsdf.example.org", not the expected "u...@example.org".


the "mail" program may fill
postfix may not to use mailname, what's your myorigin setting?

what output does "postconf myorigin" produce?

what do your logs say when you send mail via "mail" command?


so what the use case of /etc/mailname?


it's debian extension for mail clients and servers, unfortunately not all of 
them 


do you have debian or debian-based system?


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Your mouse has moved. Windows NT will now restart for changes to take
to take effect. [OK]


what's the usage of /etc/mailname

2022-11-09 Thread support
I have setup the domain in /etc/mailname, such as example.org.
but my hostname is something like sdfsfsdf.example.org.
When i send an email from terminal by "mail" commaind, the mail is sent via 
postfix installed on localhost, the sender address appears always as 
"u...@sdfsfsdf.example.org", not the expected "u...@example.org".

so what the use case of /etc/mailname?

Thank you.


Re: bad BCC address

2022-11-09 Thread patpro
OMG I'm so blind!

In my original header_checks file, only one BCC address has a 0 instead of a @, 
in my email it's a copy-paste problem.

thanks,
Patrick

November 9, 2022 9:16 AM, "Reto"  wrote:

> On Wed, Nov 09, 2022 at 08:05:20AM +, pat...@patpro.net wrote:
> 
>> Does the error mean my BCC address must be me0example.org instead of 
>> me0foo.example.org?
> 
> Ehr, you do realize that you have 0's where you'd expect an @ yes?


Re: bad BCC address

2022-11-09 Thread Reto
On Wed, Nov 09, 2022 at 08:05:20AM +, pat...@patpro.net wrote:
> Does the error mean my BCC address must be me0example.org instead of 
> me0foo.example.org?

Ehr, you do realize that you have 0's where you'd expect an @ yes?


bad BCC address

2022-11-09 Thread patpro
Hello,

I have discovered an odd warning in my logs: 

postfix/cleanup[2413186]: warning: bad BCC address "me0foo.example.org" in 
header_checks map -- need user@domain

my header_checks file looks like this:

/.*LOCAL_URI_.*/BCC me0foo.example.org
/.*LOCAL_SPAMURI_.*/BCC me0foo.example.org
/.*PDS_BTC_ID=.*/   BCC me0foo.example.org
/.*LOCAL_AC_FROM_.*/  BCC me0foo.example.org

Does the error mean my BCC address must be me0example.org instead of 
me0foo.example.org?

Thanks,
Patrick