myorigin isn't appended to local senders

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

myorigin isn't appended to local senders

Poggenpohl, Daniel
Hello everyone,

first some environment notes: I have a Vagrant VM provided by VirtualBox running Solaris 11.3 and OpenCSW postfix 2.9.4. I hope that doesn't contribute to my problem, but who knows...

It seems myorigin isn't appended to mail senders from local accounts, but rather "localhost" or "domain.com" without the "noreply" part.

My logs:
###### /var/log/syslog excerpt
## I sent a mail using the following command:
## printf "Test" | mutt -s "Test mail" root
Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: from=vagrant, size=77, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost
Oct 28 10:11:32 anotherVM postfix/smtpd[3515]: [ID 197553 mail.info] connect from localhost[127.0.0.1]
Oct 28 10:11:32 anotherVM postfix/smtpd[3515]: [ID 197553 mail.info] 6FDE5DDC3: client=localhost[127.0.0.1]
Oct 28 10:11:32 anotherVM postfix/cleanup[3518]: [ID 197553 mail.info] 6FDE5DDC3: message-id=<[hidden email]>
Oct 28 10:11:32 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] 6FDE5DDC3: from=<[hidden email]>, size=615, nrcpt=1 (queue active)
Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: to=root, ctladdr=vagrant (100/103), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30077, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 6FDE5DDC3)
Oct 28 10:11:32 anotherVM postfix/smtpd[3515]: [ID 197553 mail.info] disconnect from localhost[127.0.0.1]
Oct 28 10:11:32 anotherVM postfix/local[3519]: [ID 197553 mail.info] 6FDE5DDC3: to=<[hidden email]>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 28 10:11:32 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] 6FDE5DDC3: removed
## I sent a mail using the following command:
## printf "Test" | mutt -s "Test mail" [hidden email]
Oct 28 10:24:40 anotherVM sendmail[3675]: [ID 801593 mail.info] w9S9Oe3v003675: from=vagrant, size=103, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost
Oct 28 10:24:40 anotherVM postfix/smtpd[3647]: [ID 197553 mail.info] connect from localhost[127.0.0.1]
Oct 28 10:24:40 anotherVM postfix/smtpd[3647]: [ID 197553 mail.info] CAB32DDCF: client=localhost[127.0.0.1]
Oct 28 10:24:40 anotherVM postfix/cleanup[3650]: [ID 197553 mail.info] CAB32DDCF: message-id=<[hidden email]>
Oct 28 10:24:40 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] CAB32DDCF: from=<[hidden email]>, size=651, nrcpt=1 (queue active)
Oct 28 10:24:40 anotherVM sendmail[3675]: [ID 801593 mail.info] w9S9Oe3v003675: to=[hidden email], ctladdr=vagrant (100/103), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30103, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as CAB32DDCF)
Oct 28 10:24:40 anotherVM postfix/smtpd[3647]: [ID 197553 mail.info] disconnect from localhost[127.0.0.1]
Oct 28 10:24:40 anotherVM postfix/smtp[3671]: [ID 197553 mail.info] CAB32DDCF: to=<[hidden email]>, relay=someRelayhost.domain.com[132.176.186.2]:25, delay=0.04, delays=0/0/0.01/0.02, dsn=2.0.0, status=sent (250 ok:  Message 47864359 accepted)
Oct 28 10:24:40 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] CAB32DDCF: removed
######

My configuration (as far as I'm aware that is relevant to the problem):

The VM's hosts file:
###### /etc/hosts
::1 localhost
127.0.0.1 localhost loghost

# domain.com is our domain
192.168.123.2 someVM someVM.domain.com
192.168.123.11 anotherVM anotherVM.domain.com
######

I've deactivated the sendmail service and postfix is running and can process mails.

My aliases file:
###### aliases excerpt
postmaster: root
MAILER-DAEMON: postmaster
vagrant: root
# at the moment I'm testing, so I do not want to forward root mails yet
# root: [hidden email]
######

The possibly relevant postfix settings:
###### postconf excerpt
myhostname = anotherVM.domain.com
#mydomain = domain.tld
# self defined variable
noreplydomain = noreply.$mydomain
myorigin = anotherVM.$noreplydomain
inet_interfaces = localhost
mydestination = $myorigin, $noreplydomain, $myhostname, localhost.$mydomain, localhost
#local_recipient_maps =
# At the moment I do not want our relayhost to be bothered by my testing
relayhost=
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
######

My transport file:
###### transport excerpt:
@anotherVM local:
@anotherVM.domain.com local:
# Mails to all other receivers are relayed via the chosen relayhost
* smtp:
######

I haven't changed anything in the following files: access, canonical, generic, header_checks, master.cf, relocated, virtual

What I intend:
- I want cron generated mails sent to most users logging in to the machine to be forwarded to the root account and forward from root to another mail address, because important cron mails should be collected on a mailing list
- I want to use postfix instead of sendmail, because configuration is easier to understand
- I want my server to send mails but only receive local mails and not remote mails, because I want to funnel mails from local accounts to the root address and then forward the root mails to the mailing list
- I want mails sent from local accounts to be appended with noreply.domain.com , because our relayhost is configured to not test for an existing sender when this is the sender address

Can anyone help? Is sendmail configuration still relevant?

Kind regards,
Daniel P.
Reply | Threaded
Open this post in threaded view
|

Re: myorigin isn't appended to local senders

Wietse Venema
Poggenpohl, Daniel:

> Hello everyone,
>
> first some environment notes: I have a Vagrant VM provided by VirtualBox running Solaris 11.3 and OpenCSW postfix 2.9.4. I hope that doesn't contribute to my problem, but who knows...
>
> It seems myorigin isn't appended to mail senders from local accounts, but rather "localhost" or "domain.com" without the "noreply" part.
>
> My logs:
> ###### /var/log/syslog excerpt
> ## I sent a mail using the following command:
> ## printf "Test" | mutt -s "Test mail" root
> Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: from=vagrant, size=77, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost

That is not the POSTFIX sendmail command, therefore the warranty is void.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: myorigin isn't appended to local senders

Matus UHLAR - fantomas
>Poggenpohl, Daniel:
>> first some environment notes: I have a Vagrant VM provided by VirtualBox
>> running Solaris 11.3 and OpenCSW postfix 2.9.4.  I hope that doesn't
>> contribute to my problem, but who knows...
>>
>> It seems myorigin isn't appended to mail senders from local accounts, but
>> rather "localhost" or "domain.com" without the "noreply" part.
>>
>> My logs:
>> ###### /var/log/syslog excerpt
>> ## I sent a mail using the following command:
>> ## printf "Test" | mutt -s "Test mail" root
>> Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: from=vagrant, size=77, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost

On 28.10.18 13:37, Wietse Venema wrote:
>That is not the POSTFIX sendmail command, therefore the warranty is void.

...that is the sendmail command from sendmail package. Apparently the one
provided in solaris 11.3.

--
Matus UHLAR - fantomas, [hidden email] ; 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.
(R)etry, (A)bort, (C)ancer
Reply | Threaded
Open this post in threaded view
|

AW: myorigin isn't appended to local senders

Poggenpohl, Daniel
Hello again,

you say that the syslog entry with "sendmail" in it isn't the Postfix sendmail command, but from the sendmail package.
I've looked in the package contents:
/usr/sbin/sendmail is in the Solaris sendmail package. OK...

I've just discovered that /usr/lib/postfix/sendmail can be linked to /usr/sbin/sendmail and THEN mutt sends mail, no "sendmail" syslog entry is created, and the syslog entries look much better:
######### /var/log/syslog excerpt
Oct 28 21:21:24 anotherVM postfix/pickup[1892]: [ID 197553 mail.info] 559F725AF: uid=0 from=<root>
Oct 28 21:21:24 anotherVM postfix/cleanup[2025]: [ID 197553 mail.info] 559F725AF: message-id=<20181028212124.GA2021@anotherVM>
Oct 28 21:21:24 anotherVM postfix/qmgr[1893]: [ID 197553 mail.info] 559F725AF: from=<[hidden email]>, size=432, nrcpt=1 (queue active)
Oct 28 21:21:24 anotherVM postfix/smtp[2027]: [ID 197553 mail.info] 559F725AF: to=<root@anotherVM>, relay=none, delay=0.04, delays=0.02/0.01/0.01/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=anotherVM type=MX: Host not found, try again)
#########

Well, at least now the myorigin is appended...
Ok, further configuration of transport (use local transport for anotherVM.noreply.domain.com) and mydestination to include anotherVM.noreply.domain.com AND anotherVM...and everything works.

So, the only problem at the moment seems to be that mutt (or mail or mailx) internally uses the sendmail binary at /usr/sbin/sendmail, which I can't seem to change or haven't found how.

Should the Solaris postfix package replace /usr/sbin/sendmail with a link to /usr/lib/postfix/sendmail at installation? Is this what's missing?

Of course I can't just deinstall the package
service/network/smtp/sendmail
because the SMF fault management service package depends on that package.
What is the official method for installing postfix on Solaris? It seems just "pkg install postfix" isn't enough as links are missing (see above)...

As an aside:
Solaris 11.3 also has two SMF services running,
svc:/network/smtp:sendmail
svc:/network/sendmail-client:default

I've disabled both of them. No sendmail daemon is running anymore.
The only sendmail is started when using mutt.

I've also tried the following: I've recreated the VM and installed the Solaris postfix package (3.1) instead of the OpenCSW one. I will probably use that one in the future...

Regards,
Daniel P.

-----Ursprüngliche Nachricht-----
Von: [hidden email] <[hidden email]> Im Auftrag von Matus UHLAR - fantomas
Gesendet: Sonntag, 28. Oktober 2018 19:36
An: [hidden email]
Betreff: Re: myorigin isn't appended to local senders

>Poggenpohl, Daniel:
>> first some environment notes: I have a Vagrant VM provided by VirtualBox
>> running Solaris 11.3 and OpenCSW postfix 2.9.4.  I hope that doesn't
>> contribute to my problem, but who knows...
>>
>> It seems myorigin isn't appended to mail senders from local accounts, but
>> rather "localhost" or "domain.com" without the "noreply" part.
>>
>> My logs:
>> ###### /var/log/syslog excerpt
>> ## I sent a mail using the following command:
>> ## printf "Test" | mutt -s "Test mail" root
>> Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: from=vagrant, size=77, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost

On 28.10.18 13:37, Wietse Venema wrote:
>That is not the POSTFIX sendmail command, therefore the warranty is void.

...that is the sendmail command from sendmail package. Apparently the one
provided in solaris 11.3.

--
Matus UHLAR - fantomas, [hidden email] ; 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.
(R)etry, (A)bort, (C)ancer
Reply | Threaded
Open this post in threaded view
|

AW: myorigin isn't appended to local senders

Poggenpohl, Daniel
Hello,

of course just after I sent the mail I discover that I can change which sendmail binary is used by mutt in the configuration file...and looked at the mailx manual and found that you can also change the path to sendmail there.

The old paths have some parameters.
For example in mutt: /usr/sbin/sendmail -oem -oi
# -oem: Mail back errors
# -oi: Ignore dots in incoming messages

If I change it to /usr/lib/postfix/sendmail, do I need to set any parameters? The manual says some options are silently ignored, so I could just change the path and check if any errors are logged...

Regards,
Daniel P.

-----Ursprüngliche Nachricht-----
Von: [hidden email] <[hidden email]> Im Auftrag von Poggenpohl, Daniel
Gesendet: Sonntag, 28. Oktober 2018 22:47
An: [hidden email]
Betreff: AW: myorigin isn't appended to local senders

Hello again,

you say that the syslog entry with "sendmail" in it isn't the Postfix sendmail command, but from the sendmail package.
I've looked in the package contents:
/usr/sbin/sendmail is in the Solaris sendmail package. OK...

I've just discovered that /usr/lib/postfix/sendmail can be linked to /usr/sbin/sendmail and THEN mutt sends mail, no "sendmail" syslog entry is created, and the syslog entries look much better:
######### /var/log/syslog excerpt
Oct 28 21:21:24 anotherVM postfix/pickup[1892]: [ID 197553 mail.info] 559F725AF: uid=0 from=<root>
Oct 28 21:21:24 anotherVM postfix/cleanup[2025]: [ID 197553 mail.info] 559F725AF: message-id=<20181028212124.GA2021@anotherVM>
Oct 28 21:21:24 anotherVM postfix/qmgr[1893]: [ID 197553 mail.info] 559F725AF: from=<[hidden email]>, size=432, nrcpt=1 (queue active)
Oct 28 21:21:24 anotherVM postfix/smtp[2027]: [ID 197553 mail.info] 559F725AF: to=<root@anotherVM>, relay=none, delay=0.04, delays=0.02/0.01/0.01/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=anotherVM type=MX: Host not found, try again)
#########

Well, at least now the myorigin is appended...
Ok, further configuration of transport (use local transport for anotherVM.noreply.domain.com) and mydestination to include anotherVM.noreply.domain.com AND anotherVM...and everything works.

So, the only problem at the moment seems to be that mutt (or mail or mailx) internally uses the sendmail binary at /usr/sbin/sendmail, which I can't seem to change or haven't found how.

Should the Solaris postfix package replace /usr/sbin/sendmail with a link to /usr/lib/postfix/sendmail at installation? Is this what's missing?

Of course I can't just deinstall the package
service/network/smtp/sendmail
because the SMF fault management service package depends on that package.
What is the official method for installing postfix on Solaris? It seems just "pkg install postfix" isn't enough as links are missing (see above)...

As an aside:
Solaris 11.3 also has two SMF services running,
svc:/network/smtp:sendmail
svc:/network/sendmail-client:default

I've disabled both of them. No sendmail daemon is running anymore.
The only sendmail is started when using mutt.

I've also tried the following: I've recreated the VM and installed the Solaris postfix package (3.1) instead of the OpenCSW one. I will probably use that one in the future...

Regards,
Daniel P.

-----Ursprüngliche Nachricht-----
Von: [hidden email] <[hidden email]> Im Auftrag von Matus UHLAR - fantomas
Gesendet: Sonntag, 28. Oktober 2018 19:36
An: [hidden email]
Betreff: Re: myorigin isn't appended to local senders

>Poggenpohl, Daniel:
>> first some environment notes: I have a Vagrant VM provided by VirtualBox
>> running Solaris 11.3 and OpenCSW postfix 2.9.4.  I hope that doesn't
>> contribute to my problem, but who knows...
>>
>> It seems myorigin isn't appended to mail senders from local accounts, but
>> rather "localhost" or "domain.com" without the "noreply" part.
>>
>> My logs:
>> ###### /var/log/syslog excerpt
>> ## I sent a mail using the following command:
>> ## printf "Test" | mutt -s "Test mail" root
>> Oct 28 10:11:32 anotherVM sendmail[3514]: [ID 801593 mail.info] w9S9BWpe003514: from=vagrant, size=77, class=0, nrcpts=1, msgid=<[hidden email]>, relay=root@localhost

On 28.10.18 13:37, Wietse Venema wrote:
>That is not the POSTFIX sendmail command, therefore the warranty is void.

...that is the sendmail command from sendmail package. Apparently the one
provided in solaris 11.3.

--
Matus UHLAR - fantomas, [hidden email] ; 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.
(R)etry, (A)bort, (C)ancer