Re: rsyslogd and postfix

2018-04-27 Thread Bill Shirley
Here's what I use for Shorewall messages: /etc/rsyslog.d/00-shorewall.conf: if $msg contains 'Shorewall' then {   action(type="omfile" file="/var/log/shorewall.log") # if ($syslogfacility == 0 and $syslogseverity >= 4) then stop  # warning # if ($syslogfacility == 0 and $syslogseverity >= 5) then

Re: inet_interfaces

2018-04-24 Thread Bill Shirley
My approach would be to SNAT it with iptables. -s pub.lic.adr.1 -m policy --pol none --dir out -j SNAT --to-source pub.lic.adr.2 Bill On 4/23/2018 6:38 PM, @lbutlr wrote: On 2018-04-23 (15:30 MDT), Viktor Dukhovni wrote: With separate transports, one can have "-o smtp_bind_address=127.0.0.1"

Re: Two different IP for one mx

2018-01-30 Thread Bill Shirley
On 1/30/2018 9:15 AM, Karol Augustin wrote: From the information you provided it looks like problem is not fixable by you. It's ok to have private address configured on your server if it is properly translated upstream. Amazon does that. You have private IP configured on your machine but it is t

Re: Two different IP for one mx

2018-01-30 Thread Bill Shirley
On the new Postfix server, are you using DHCP client on the WAN interface to get a IP address?  You should not be.  You should assign your public address to the WAN interface. I have static addresses with my ISP.  My ISP's modem will hand out private addresses if I use DHCP client.  I don't conf

Re: Including the service name in logging

2018-01-14 Thread Bill Shirley
More information = more better  :-) This should give the fail2ban users/developers something to do. Thanks, Bill On 1/14/2018 2:08 PM, Wietse Venema wrote: This weekend I added a service_name feature that is documented as follows: [begin quote] service_name (read-only) The master.cf ser

Re: ot: MySQL config/tuning advice

2018-01-03 Thread Bill Shirley
Make sure all .cnf files have permissions 644 to that all users (apache, postfix, etc) can read them: [0:root@elmo filter.d]$ ls -l /etc/my.cnf /etc/my.cnf.d/ -rw-r--r--. 1 root root  345 Feb 14  2016 /etc/my.cnf /etc/my.cnf.d/: total 24 -rw-r--r--. 1 root root 4128 Jul 27  2015 99-mystuff.cnf -r

Re: weird error w procmail and spamassassin

2017-10-19 Thread Bill Shirley
I don't think anyone can help you unless you post some configuration. Post 'postconf -n' and your procmail recipe for starters. Bill On 10/19/2017 9:12 AM, Michael Segel wrote: I’m configuring a new mail server and I’ve set up postfix to call procmail which then calls spam assassin. The prob

Re: Blocking mail from clients who

2017-10-15 Thread Bill Shirley
> /.*@mydomain.tld/ REJECT The leading .* is not needed.  You should escape the period before tld (\.).  You can also send a message: /@.*example\.com$/    REJECT You are not me (40,000). This works for me.  Note: I'm using pcre instead of regexp. Bill On 10/15/2017 1:04 PM, Dominic Raferd

Re: Sending with Multiple Domain Suffixes from Single Apache Server Box

2017-10-11 Thread Bill Shirley
cond.com"; $result = mail($to, $subject, $message, $headers, "-f second.com") ; On the second try, I don't get greylisted. $result always seems to be 1 regardless Bill Shirley wrote If your outbound mail isn't working, you should post the output of postconf -n so someo

Re: Sending with Multiple Domain Suffixes from Single Apache Server Box

2017-10-11 Thread Bill Shirley
If your outbound mail isn't working, you should post the output of postconf -n so someone can help you. Bill On 10/11/2017 1:59 PM, Wietse Venema wrote: certified: Actually I don't know the postfix main and master config file edits required to send outgoing mail. The default ones seem to be o

Re: Sending with Multiple Domain Suffixes from Single Apache Server Box

2017-10-11 Thread Bill Shirley
I let PHPMailer do the heavy lifting:       $email_addresses = array(         'first.com'=>'j...@first.com'         ,'another.com'=>'b...@another.com'       );       if (is_set($email_addresses[$returndomain])) $from_address = $email_addresses[$returndomain];       else die("returndomain=$returnd

Re: Letsencrypt tip

2017-09-11 Thread Bill Shirley
Thanks for the info. With acme.sh, reloads are only done when the certificate is renewed. Bill On 9/11/2017 1:18 PM, Viktor Dukhovni wrote: On Sep 11, 2017, at 1:10 PM, Bill Shirley wrote: acme.sh can issue the reload command (--reloadcmd): https://www.mail-archive.com/dovecot@dovecot.org

Re: Letsencrypt tip

2017-09-11 Thread Bill Shirley
acme.sh can issue the reload command (--reloadcmd): https://www.mail-archive.com/dovecot@dovecot.org/msg70894.html Get an email from acme.sh: https://www.mail-archive.com/dovecot@dovecot.org/msg70895.html Bill On 9/11/2017 4:59 AM, Gary wrote: As you know, letsencrypt certs can be automaticall

Re: How do you add LOGLEVEL labels to Postfix log output?

2017-08-19 Thread Bill Shirley
Is there some specific text that rsyslog can key off of? I use this for Shorewall and dhcpd (right after the RULES line): if $msg contains 'Shorewall' then { action(type="omfile" file="/var/log/shorewall.log") if ($syslogfacility == 0 and $syslogseverity >= 6) then stop # info } i

Re: dovecot cram-md5 setting break sending emails

2017-02-23 Thread Bill Shirley
Sounds like you have a problem in /etc/dovecot/dovecot-sql.conf Did you ever post it? For virtual users, mine is: driver = mysql # Currently supported schemes include PLAIN, PLAIN-MD5, DIGEST-MD5, and CRYPT. default_pass_scheme = PLAIN # Database options connect = host=/var/lib/mysql/mysql.soc

Re: sieve sending vacation message from vm...@ns1.domain.tld

2016-10-13 Thread Bill Shirley
I use dovecot-lda for delivery where the parms are: -d ${user}@${domain} -a {recipient} -f ${sender} -m ${extension} Perhaps they may work for /usr/libexec/dovecot/deliver [0:root@elmo webmaster]$ rpm -q dovecot dovecot-2.2.22-1.fc22.x86_64 Bill On 10/12/2016 10:56 AM, Wietse Venema wrote: Ma

Re: Mysql Lookup table

2016-03-03 Thread Bill Shirley
What do the two tables look like? Can you use a SQL 'JOIN' or 'LEFT JOIN'? What is the 'WHERE' criteria? Bill On 3/3/2016 8:34 AM, Peter Sørensen wrote: Hi, Would it be possible to make a query from 2 tables in the mysql lookup Specifying this in additional_conditions ? Regards Peter Søre

Re: PHPMailer different behavior..

2016-03-02 Thread Bill Shirley
Not enough information to even guess what is going on. In my apps when I accept an email address, I use a little bit of ajax to verify the domain: if ($email != '') { $tmp = explode('@', $email); if (isset($tmp[1])) { $got_mx = getmxrr($tmp[1], $mxhosts); if ($got_mx) {

Re: transport smtp failure after MySQL connection

2016-02-25 Thread Bill Shirley
If you don't see any connection in the MySQL logs, check that the Unix socket is in the correct place and has the correct permissions. [0:root@elmo DocumentRoot]$ cat /etc/redhat-release Fedora release 22 (Twenty Two) [0:root@elmo DocumentRoot]$ ldpz /var/lib/mysql/mysql.sock drwxr-xr-x. 25 root

Re: transport smtp failure after MySQL connection

2016-02-24 Thread Bill Shirley
Have you looked at the MySQL logs? Bill On 2/24/2016 10:36 AM, Christian Renner wrote: Hi all We are using postfix smtp_tls_policy_maps with a MySQL lookup table. This setup worked good until we upgraded the following packages today because of CVE-2015-7547 (its a debian wheezy, upgraded as u

Re: Change Temporary failure in name resolution response code

2016-02-04 Thread Bill Shirley
You might want to have a look at fail2ban. It monitors log files and blocks the offender by inserting an iptables DROP entry. I block a lot of spammers this way. I wouldn't think of running a mail server without it. Bill On 2/4/2016 4:10 PM, Inteq Solution - Dep. Tehnic wrote: Thank you W

Re: Question on master.cf (possible documentation patch)

2016-01-16 Thread Bill Shirley
I'm no Postfix guru but I'm using this on the backup mx. Suppose your domain is example.com. /etc/postfix/main.cf: transport_maps = hash:/etc/postfix/my.tables/transport /etc/postfix/my.tables/transport: example.comsmtp:[primary.example.com]:12345 .example.comsmtp:[prima

Re: Is this a correct way to define PCRE lists?

2015-12-12 Thread Bill Shirley
I don't see anything "wrong". The default for .pcre is case independence. I use "REJECT Spam not allowed." instead of DISCARD. You're not escaping your period (\.com). You can combine some of these into a single rule: /mediablueinc\.(cf|com|ga)$/REJECT Spam not allowed (1). /\.(top|ninja|d