Re: Postfix Mac Aministration

2012-01-07 Thread Stan Hoeppner
On 1/6/2012 8:35 PM, Eric Lemings wrote:

> Current 'postconf -n' output:
> 
> command_directory = /usr/sbin

This is likely your default.  Check with 'postconf -d command_directory'
and remove this line if it is.  Don't re-specify default values in
main.cf.  It simply clutters things up making sleuthing more difficult
than need be.

> config_directory = /etc/postfix

Same as above.

> daemon_directory = /usr/libexec/postfix

Possibly here as well.  On Debian it's /usr/lib/postfix but on OSX it
may be libexec.  If the default is libexec, remove this line.

> debug_peer_level = 2

This is the default value.  Remove this line.  Unless of course Apple
changed the default to another value, which they should not have.

> enable_server_options = yes

This doesn't seem to be a valid main.cf parameter.  An Apple add-on I
assume.

> imap_submit_cred_file = /private/etc/postfix/submit.cred

Same here.

> inet_interfaces = all

Again, default.  Remove this line.

> local_recipient_maps = proxy:unix:passwd.byname $alias_maps

Default.  Remove.

> mail_owner = _postfix

Default.  Remove.

> mailq_path = /usr/bin/mailq

Default.  Remove.

> manpage_directory = /usr/share/man

Default.  Remove.

> maps_rbl_domains = 

Deprecated parameter.  Remove.

> mydestination = $myhostname, localhost.$mydomain, localhost, myhost, 
> $mydomain, mail

Are you sure you need all 6 of these?

> mydomain_fallback = localhost

Another Apple add on, seems useless.

> newaliases_path = /usr/bin/newaliases

Default.  Remove.

> postscreen_dnsbl_sites = zen.spamhaus.org*2 rbl-plus.mail-abuse.org 
> bl.spamcop.net

Again, MAPS is a paid service.  If you don't have a subscription remove.

> readme_directory = /usr/share/doc/postfix

Default.  Remove.

> relayhost = 

Default.  Remove.

> sendmail_path = /usr/sbin/sendmail

Default.  Remove.

> smtp_sasl_auth_enable = no
> smtp_sasl_password_maps = 
> smtpd_enforce_tls = no

All 3 are defaults.  Remove them.

> smtpd_helo_restrictions = permit_mynetworks,check_helo_access 
> hash:/etc/postfix/helo_access,reject_non_fqdn_helo_hostname,
> reject_invalid_helo_hostname,permit

Consolidate your helo restrictions into recipient restrictions.

> smtpd_pw_server_security_options = cram-md5,gssapi,login,plain

Yet another Apple add on...

> smtpd_recipient_restrictions = reject_unauth_pipelining,
> reject_non_fqdn_recipient,reject_unknown_recipient_domain,
> permit_mynetworks,permit_sasl_authenticated,
> reject_unauth_destination,reject_rhsbl_client dbl.spamhaus.org,
> reject_rhsbl_sender dbl.spamhaus.org,reject_rhsbl_helo dbl.spamhaus.org,  
>   reject_rbl_client zen.spamhaus.org,reject_rbl_client 
> rbl-plus.mail-abuse.org,reject_rbl_client bl.spamcop.net,
> check_policy_service unix:private/policy,permit

You may want to move these first 3 after reject_unauth_destination.
Also, there's no need for an explicit permit at the end as that is the
default behavior.

> smtpd_use_pw_server = yes

Yet another Apple add on.

> tls_random_source = dev:/dev/urandom

Default.  Remove.

> unknown_local_recipient_reject_code = 550

Default.  Remove.

> use_sacl_cache = yes

Another Apple add on.

> virtual_alias_maps = $virtual_maps

Default.  Remove.


I'm guessing a lot of the redundant default junk in your main.cf was
inserted by Apple (IIRC the CentOS/Red Hat people are horrible about
this as well).  Thus your next package upgrade may put them right back in.

> Still quite a bit of spam getting through.

The spam making it in is probably not related to some of the changes you
should make above.  Post the "connect from:" lines in your mail log of a
dozen or so of these spam connections so we can identify the sources and
recommend tools/methods to put a dent in it.

-- 
Stan


Re: Ok. I'm finding a small issue on my server.

2012-01-07 Thread Benny Pedersen

On Tue, 27 Dec 2011 08:22:47 +0100, Bjørn Ruberg wrote:

Be advised that if you plan to reject
*sender addresses* claiming to originate from your own domain, you
might break legitimate mails.


how ?


Re: Ok. I'm finding a small issue on my server.

2012-01-07 Thread Benny Pedersen

On Tue, 27 Dec 2011 14:07:22 +0100, Jeroen Geilman wrote:


smtpd_tls_auth_only = yes

to main.cf; otherwise, all authentication communication is sent "in
the clear".


this will only break starttls clients, that means connection must be 
tls before connection, it will not make plain passwords more secure




Re: Ok. I'm finding a small issue on my server.

2012-01-07 Thread Noel Jones
On 1/7/2012 8:33 PM, Benny Pedersen wrote:
> On Tue, 27 Dec 2011 14:07:22 +0100, Jeroen Geilman wrote:
> 
>> smtpd_tls_auth_only = yes
>>
>> to main.cf; otherwise, all authentication communication is sent "in
>> the clear".
> 
> this will only break starttls clients, that means connection must be
> tls before connection, it will not make plain passwords more secure
> 

Wrong.  This prevents postfix from sending the AUTH keyword or
accepting the AUTH command until an encrypted connection is
established (either STARTTLS or wrappermode).

It increases security by making sure that all passwords are sent in
an encrypted tunnel.  Since several popular clients can only do
PLAIN or LOGIN, this is a good thing.

The only clients this will break are those that aren't configured to
use an encrypted connection -- and that's the whole idea.


You can see this yourself pretty easily by connecting with telnet
and then connecting with openssl s_client.


  -- Noel Jones


Re: Ok. I'm finding a small issue on my server.

2012-01-07 Thread Bjørn Ruberg

On 01/08/2012 03:26 AM, Benny Pedersen wrote:

On Tue, 27 Dec 2011 08:22:47 +0100, Bjørn Ruberg wrote:

Be advised that if you plan to reject
*sender addresses* claiming to originate from your own domain, you
might break legitimate mails.


how ?


Mailing lists like this one, for instance. When you post to the 
postfix-users list, your message is redistributed from the list's 
servers having your address as the originating address. The message will 
originate from outside of your systems but will have your From: address. 
If you block this, you won't see your own postings to the list.


This is an excerpt from the headers in your e-mail:

 From: Benny Pedersen
 To:
 Subject: Re: Ok. I'm finding a small issue on my server.


--
Bjørn


Re: Ok. I'm finding a small issue on my server.

2012-01-07 Thread Peter
On 08/01/12 20:00, Bjørn Ruberg wrote:
> On 01/08/2012 03:26 AM, Benny Pedersen wrote:
>> On Tue, 27 Dec 2011 08:22:47 +0100, Bjørn Ruberg wrote:
>>> Be advised that if you plan to reject
>>> *sender addresses* claiming to originate from your own domain, you
>>> might break legitimate mails.
>>
>> how ?
> 
> Mailing lists like this one, for instance. When you post to the
> postfix-users list, your message is redistributed from the list's
> servers having your address as the originating address. The message will
> originate from outside of your systems but will have your From: address.
> If you block this, you won't see your own postings to the list.
> 
> This is an excerpt from the headers in your e-mail:
> 
>  From: Benny Pedersen
>  To:
>  Subject: Re: Ok. I'm finding a small issue on my server.

This is a common misconception.  The envelope sender is not the same as
the From: header.  This is the envelope sender for your message (and
indeed for every message from this mailing list):

Return-Path: 


Peter