Heinz Diehl wrote:
On 16.04.2014, Timothy Murphy wrote:
> The two config files (master.cf and main.cf) are difficult to follow,
> and the documentation is poor.
For a homeserver or "single use" MTA:
1. leave master.cf alone
2. Define these in main.cf
- myhostname
- mydomain
- myorigin
- mydestination
- mynetworks_style
- relay_domains
- home_mailbox
Maybe you'll have to take a look into aliases, too.
That's all.
There's plenty of documentation and examples out there.
https://wiki.archlinux.org/index.php/postfix
http://yhager.com/content/simple-outgoing-mail-server-archlinux
It doesn't get any easier...
Thanks for your response, which I found quite useful.
I actually have postfix working OK, as far as I can tell,
with amavisd, clamav, spamassassin and dovecot.
[I actually started just running postfix + dovecot,
but had problems adding spamassassin, which in my case was vital.
I was advised that the "correct" way to deal with this was to run amavisd.]
I found I could only set myorigin and mydestination by experiment;
I didn't understand the descriptions in main.cf.
Your choice of documentation is a little odd;
I would hesitate to follow documentation for another OS.
I found I had to make several changes when going from CentOS-5 to CentOS-6.
But I'm interested in any comments you (or anyone else) has on my setup.
I give my "diffs" from the given main.cf below.
I didn't set mynetworks_style because I didn't understand
the advice in main.cf:
-------------------
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
-------------------
It seems curious to set a default which is said not to work properly.
What do you set it to, as a matter of interest?
Here are my diffs [line numbers deleted]
-------------------
[tim@alfred postfix]$ diff main.cf main.cf.orig
< myhostname = alfred.gayleard.eu
< mydomain = gayleard.eu
< myorigin = $mydomain
< inet_interfaces = all
inet_interfaces = localhost
mydestination = $myhostname, localhost.$mydomain, localhost
< mydestination =
$myhostname, localhost.$mydomain, localhost, $mydomain
< mynetworks = 192.168.0.0/24, 127.0.0.0/8
< relay_domains =
< relayhost = out.alice.it
< home_mailbox = Maildir/
< # added by TGM
< content_filter=amavisfeed:[127.0.0.1]:10024
<
< smtp_sasl_auth_enable = yes
< smtp_sasl_password_maps = hash:/etc/postfix/password
< smtp_sasl_security_options =
-------------------
--
Timothy Murphy
e-mail: gayleard /at/
eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland