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=<[email protected]>, 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=<[email protected]>
Oct 28 10:11:32 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] 6FDE5DDC3: 
from=<[email protected]>, 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=<[email protected]>, 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" [email protected]
Oct 28 10:24:40 anotherVM sendmail[3675]: [ID 801593 mail.info] w9S9Oe3v003675: 
from=vagrant, size=103, class=0, nrcpts=1, 
msgid=<[email protected]>, 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=<[email protected]>
Oct 28 10:24:40 anotherVM postfix/qmgr[3509]: [ID 197553 mail.info] CAB32DDCF: 
from=<[email protected]>, size=651, nrcpt=1 (queue active)
Oct 28 10:24:40 anotherVM sendmail[3675]: [ID 801593 mail.info] w9S9Oe3v003675: 
[email protected], 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=<[email protected]>, 
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: [email protected]
######

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 via email to