4

I have a machine with http://phabricator.org/ set up on it and I would like to set up postfix to enable e-mail sending to my company's mailboxes (as for notification emails coming from e.g. phabricator@codeaudit.local).

Let's say that SMTP server is smtp.company.net.

What do I have to do to allow postfix to send emails to that server without an account on it? Is it connected with relayhost configuration in /etc/postfix/main.cf ?

I have Jenkins set up on another machine in this network and the only thing I had to set up was SMTP's hostname (here smtp.company.net) and admin's e-mail which is used to send e-mails (yet there is no account of this e-mail at the STMP server).

I have set up on both Jenkins and phabricator LDAP authentication but in some magical reason Jenkins works and I get this error in /var/log/maillog:

Oct  6 16:36:22 hostname_machine postfix/smtp[15077]: fatal: open database /etc/postfix/sasl_passwd.db: No such file or directory
Oct  6 16:36:23 hostname_machine postfix/master[14965]: warning: process /usr/libexec/postfix/smtp pid 15077 exit status 1
Oct  6 16:36:23 hostname_machine postfix/master[14965]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling

I can create this sasl_passwd.db with

postmap /etc/postfix/sasl_passwd

but this is not the point since I have LDAP authentication and no account for this "notification email sender" and ... it works on Jenkins magically.

NOTE After putting manually my personal account's credentials to sasl_passwd

echo "smtp.company.net myusername:mypassword" > /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
service postfix restart

I get this in postmap /etc/postfix/sasl_passwd:

Oct  6 16:42:28 hostname_machine postfix/pickup[15611]: 9237FE4E6E: uid=0 from=<root>
Oct  6 16:42:28 hostname_machine postfix/trivial-rewrite[15650]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Oct  6 16:42:28 hostname_machine postfix/cleanup[15648]: 9237FE4E6E: message-id=<7da01ffd66ed0b4a36ba53872c947cf5@localhost.localdomain>
Oct  6 16:42:28 hostname_machine postfix/qmgr[15612]: 9237FE4E6E: from=<root@mail.example.com>, size=545, nrcpt=1 (queue active)
Oct  6 16:42:29 hostname_machine postfix/smtp[15614]: 9237FE4E6E: to=<myusername@company.net>, relay=smtp.company.net[10.115.11.11]:25, delay=0.51, delays=0.16/0/0.17/0.18, dsn=2.0.0, status=sent (250 2.0.0 s96DgSY3016471 Message accepted for delivery)
Oct  6 16:42:29 hostname_machine postfix/qmgr[15612]: 9237FE4E6E: removed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.