I wrote:

In case someone else also wants to setup this, here's the final steps to
make relaying work.

> Relaying does not work yet, I get a "Relay access denied (in reply to
> RCPT TO command)" error. But my initial goal is reached, I can send mail
> to {root,wonko}@wonkology.org. That's all I wanted.
> 
> Many many thanks kashani! Your howto is much more than I expected, it is
> much appreciated. I realize that postfix is not too complicated, so I
> will play more with it when I have some spare time.

Yesterday I had some. It took me a while to figure out what was wrong. I
read many howtos, but they all did not explain in detail how to
authenticate with another SMTP server, so postfix would act as a client.

It turned out that the error was simple: I had to change
  smtp_sasl_tls_security_level = may
to
  smtp_tls_security_level = may
. So, my relay config part of main.cf is this:

relayhost = [my.external.relay.host]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
smtp_tls_cert_file = /etc/ssl/postfix/weird.pem

And I had to create the (self-signed) certificate. It's done like this:
openssl req -x509 -nodes -days 3650 -newkey rsa:1024 -keyout
/etc/ssl/postfix/weird.pem

I was told I had to set my name to my hostname, not sure if this is true.

Done. My host now acts as SMPT server, accepting connections without
password from the LAN. Now I can enable mail sending for the other
Gentoo systems here in make.conf. And in ssmtp.conf, so things like cron
can send status mails to me.

Thanks again Kashani, without you help I would not have tried this.

        Wonko

Reply via email to