From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Setting up SMTP relay
Date: Sun, 23 Jan 2011 20:23:45 +0100 [thread overview]
Message-ID: <4D3C8041.2070105@wonkology.org> (raw)
In-Reply-To: <4D3B53AC.904@badapple.net>
kashani writes:
> On 1/22/2011 1:34 PM, Alex Schuster wrote:
> I handle it with Postfix. Dovecot is only imap and won't accept main
> directly.
Whoops.
> 1. install postfix with USE sasl or devecot-sasl, I don't believe it
> matters which. Add the following lines to the bottom of
> /etc/postfix/main.cf and fill in your hostname, domain, etc as needed.
>
> # local settings
> myhostname = host.domain.com
> mydomain = domain.com
> myorigin = $myhostname
> inet_interfaces = all
> mydestination = $myhostname, localhost.$mydomain, localhost
> mynetworks_style = subnet
> mynetworks = 127.0.0.0/8 10.19.20.0/24
I left most items commented out as they are the same as the default, I
only had to set mydomain, although dnsdomainname and hostname -d both
return wonkology.org.
> 2. run sudo newaliases
> Postfix bitches if the /etc/mail/aliases.db doesn't exist and will hang
> on start.
>
> 3. Verify postfix works, isn't complaining in the logs, etc.
> Make sure it's up and running. That you can telnet to port 25 from
> another machine and even send to a local user on your machine.
Looks good!
> 4. Add the user/pass stuff to the bottom of /etc/postfix/main.cf
>
> # relay host and credentials
> relayhost = [my.external.relayhost.com]
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/sasl.passwd
> smtp_sasl_mechanism_filter = digest-md5
> smtp_sasl_security_options = noanonymous
I need TLS authentication, and found what I need in a howto:
smtp_sasl_tls_security_level = may
And I removed smtp_sasl_mechanism_filter.
> 5. Once you're this far it's time to test all the way through.
>
> make sure you can send from the localhost machine
> sendmail -v some@address.com
> .
>
> Once you're sure that works test from another machine on the network.
> Ideally it should just work if you've done all the steps.
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.
Wonko
next prev parent reply other threads:[~2011-01-23 19:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-22 21:34 [gentoo-user] Setting up SMTP relay Alex Schuster
2011-01-22 22:01 ` kashani
2011-01-23 19:23 ` Alex Schuster [this message]
2011-01-23 19:56 ` kashani
2011-01-23 20:20 ` Alan McKinnon
2011-01-23 20:48 ` [gentoo-user] " walt
2011-01-23 21:04 ` Alan McKinnon
2011-01-24 0:02 ` [gentoo-user] " kashani
2011-01-24 0:26 ` Alan McKinnon
2011-01-24 1:22 ` kashani
2011-01-24 7:00 ` Mick
2011-01-24 7:24 ` Alan McKinnon
2011-01-24 7:06 ` Alan McKinnon
2011-02-05 14:37 ` Alex Schuster
2011-01-26 4:04 ` Walter Dnes
2011-01-26 6:46 ` Mick
2011-01-26 9:07 ` Stroller
2011-01-26 16:52 ` kashani
2011-01-28 23:48 ` Stroller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3C8041.2070105@wonkology.org \
--to=wonko@wonkology.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox