View Single Post
  #12  
Old 20th April 2013, 21:05
danhansen@denmark danhansen@denmark is offline
Senior Member
 
Join Date: Mar 2013
Posts: 255
Thanks: 55
Thanked 4 Times in 4 Posts
Exclamation So far so good...

Quote:
Originally Posted by markc View Post
The next thing to check is this...

check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf

so add this to your /etc/mysql/my.cnf files under the [mysqld] sections...

general_log = 1
general_log_file = /var/log/mysql/mysql.log


and tail -f /var/log/mysql/mysql.log while a message comes in/ What you are looking for is the EXACT mysql query which is defined in the mysql-virtual_recipient.cf file (cat the file to see it).

Once you see the log entry for, say, postmaster then ctrl-c out of tailing the log file and at the prompt type...

mysql -e "PASTE THE ENTIRE QUERY FROM THE MYSQL LOG FILE HERE;"

and that will either successfuly return a correct lookup... or give you an error as to why it failed, which could be as simple as the server_id field being wrong.
Hi Mark,

After making a backup of the original file "/etc/mysql/my.cf" I made the changes you told me too:

Code:
[mysqld]
#
# * Basic Settings
#

#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#

user            = mysql
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
general_log     = 1
general_log_file = /var/log/mysql/mysql.log
skip-external-locking
But the rest you will have to provide me some details, "spell it out" you know

And this:
"IMPORTANT
If you make changes to these settings and your system uses apparmor, you may
also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.


Are all these errors due to the release upgrade I did? According to some, the ISPconfig 3 installation should work as a default installation!?

Well, here's the mail-log after rebooting - theres some remarks regarding SQL:

Code:
Apr 20 20:06:10 server1 amavis[1186]: Module URI 1.59
Apr 20 20:06:10 server1 amavis[1186]: Module Unix::Syslog 1.1
Apr 20 20:06:10 server1 amavis[1186]: Amavis::DB code loaded
Apr 20 20:06:10 server1 amavis[1186]: Amavis::Cache code loaded
Apr 20 20:06:10 server1 amavis[1186]: SQL base code loaded
Apr 20 20:06:10 server1 amavis[1186]: SQL::Log code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: SQL::Quarantine NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: Lookup::SQL code loaded
Apr 20 20:06:10 server1 amavis[1186]: Lookup::LDAP code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: AM.PDP-in proto code loaded
Apr 20 20:06:10 server1 amavis[1186]: SMTP-in proto code loaded
Apr 20 20:06:10 server1 amavis[1186]: Courier proto code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: SMTP-out proto code loaded
Apr 20 20:06:10 server1 amavis[1186]: Pipe-out proto code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: BSMTP-out proto code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: Local-out proto code loaded
Apr 20 20:06:10 server1 amavis[1186]: OS_Fingerprint code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: ANTI-VIRUS code loaded
Apr 20 20:06:10 server1 amavis[1186]: ANTI-SPAM code loaded
Apr 20 20:06:10 server1 amavis[1186]: ANTI-SPAM-EXT code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: ANTI-SPAM-C code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: ANTI-SPAM-SA code loaded
Apr 20 20:06:10 server1 amavis[1186]: Unpackers code loaded
Apr 20 20:06:10 server1 amavis[1186]: DKIM code loaded
Apr 20 20:06:10 server1 amavis[1186]: Tools code NOT loaded
Apr 20 20:06:10 server1 amavis[1186]: Found $file at /usr/bin/file
Apr 20 20:06:10 server1 amavis[1186]: No $altermime, not using it
Apr 20 20:06:10 server1 amavis[1186]: Internal decoder for .mail
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .F
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .Z at /bin/uncompress
Apr 20 20:06:10 server1 amavis[1186]: Internal decoder for .gz
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .bz2 at /bin/bzip2 -d
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .lzo at /usr/bin/lzop -d
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .rpm tried: rpm2cpio.pl, rpm2cpio
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .cpio at /bin/pax
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .tar at /bin/pax
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .deb at /usr/bin/ar
Apr 20 20:06:10 server1 amavis[1186]: Internal decoder for .zip
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .7z tried: 7zr, 7za, 7z
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .rar tried: unrar-free
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .arj at /usr/bin/arj
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .arc at /usr/bin/nomarch
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .zoo at /usr/bin/zoo
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .lha
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .doc tried: ripole
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .cab at /usr/bin/cabextract
Apr 20 20:06:10 server1 amavis[1186]: No decoder for .tnef
Apr 20 20:06:10 server1 amavis[1186]: Internal decoder for .tnef
Apr 20 20:06:10 server1 amavis[1186]: Found decoder for .exe at /usr/bin/arj
Apr 20 20:06:10 server1 amavis[1186]: Using primary internal av scanner code for ClamAV-clamd
Apr 20 20:06:10 server1 amavis[1186]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Apr 20 20:06:10 server1 amavis[1186]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.49, libdb 5.1
Apr 20 20:06:11 server1 spamd[1202]: logger: removing stderr method
Apr 20 20:06:19 server1 spamd[1318]: spamd: server started on port 783/tcp (running version 3.3.2)
Apr 20 20:06:19 server1 spamd[1318]: spamd: server pid: 1318
Apr 20 20:06:19 server1 spamd[1318]: spamd: server successfully spawned child process, pid 1469
Apr 20 20:06:19 server1 spamd[1318]: spamd: server successfully spawned child process, pid 1470
Apr 20 20:06:19 server1 spamd[1318]: prefork: child states: II
Apr 20 20:06:36 server1 authdaemond: modules="authmysql", daemons=5
Apr 20 20:06:36 server1 authdaemond: Installing libauthmysql
Apr 20 20:06:36 server1 authdaemond: Installation complete: authmysql
Apr 20 20:06:38 server1 postfix/master[2075]: daemon started -- version 2.9.6, configuration /etc/postfix
Apr 20 20:07:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:07:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Apr 20 20:07:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:07:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
Apr 20 20:07:02 server1 postfix/smtpd[2272]: connect from localhost[127.0.0.1]
Apr 20 20:07:02 server1 postfix/smtpd[2272]: lost connection after CONNECT from localhost[127.0.0.1]
Apr 20 20:07:02 server1 postfix/smtpd[2272]: disconnect from localhost[127.0.0.1]
Apr 20 20:07:20 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:07:20 server1 imapd: LOGIN, user=postmaster@apollo1.dk, ip=[::ffff:127.0.0.1], port=[42185], protocol=IMAP
Apr 20 20:07:21 server1 imapd: LOGOUT, user=postmaster@apollo1.dk, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=392, time=1
Apr 20 20:08:01 server1 postfix/smtpd[2272]: connect from localhost[127.0.0.1]
Apr 20 20:08:01 server1 postfix/smtpd[2272]: lost connection after CONNECT from localhost[127.0.0.1]
Apr 20 20:08:01 server1 postfix/smtpd[2272]: disconnect from localhost[127.0.0.1]
Apr 20 20:08:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:08:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Apr 20 20:08:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:08:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
Apr 20 20:09:01 server1 postfix/smtpd[2272]: connect from localhost[127.0.0.1]
Apr 20 20:09:01 server1 postfix/smtpd[2272]: lost connection after CONNECT from localhost[127.0.0.1]
Apr 20 20:09:01 server1 postfix/smtpd[2272]: disconnect from localhost[127.0.0.1]
Apr 20 20:09:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:09:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Apr 20 20:09:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:09:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
Apr 20 20:10:01 server1 postfix/smtpd[2272]: connect from localhost[127.0.0.1]
Apr 20 20:10:01 server1 postfix/smtpd[2272]: lost connection after CONNECT from localhost[127.0.0.1]
Apr 20 20:10:01 server1 postfix/smtpd[2272]: disconnect from localhost[127.0.0.1]
Apr 20 20:10:01 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:10:01 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Apr 20 20:10:01 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:10:01 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
Apr 20 20:10:02 server1 postfix/smtpd[2272]: connect from localhost[127.0.0.1]
Apr 20 20:10:02 server1 postfix/smtpd[2272]: lost connection after CONNECT from localhost[127.0.0.1]
Apr 20 20:10:02 server1 postfix/smtpd[2272]: disconnect from localhost[127.0.0.1]
Apr 20 20:10:02 server1 pop3d: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:10:02 server1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Apr 20 20:10:02 server1 imapd: Connection, ip=[::ffff:127.0.0.1]
Apr 20 20:10:02 server1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
And regarding the receiving mail part:

Code:
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:7fe::53#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:67c:e0::1#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:500:87::87#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:43f8:110::10#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:500:13::73#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '169.212.85.209.in-addr.arpa/PTR/IN': 2001:dd8:6::101#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving 'z.arin.net/A/IN': 2001:500:31::108#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '174.212.85.209.in-addr.arpa/PTR/IN': 2001:5a0:10::2#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving '174.212.85.209.in-addr.arpa/PTR/IN': 2001:500:14:6050:ad::1#53
Apr 20 20:16:49 server1 named[1016]: error (network unreachable) resolving 'in-addr.arpa/DS/IN': 2001:dc3::35#53
Apr 20 20:16:50 server1 named[1016]: error (network unreachable) resolving '125.74.in-addr.arpa/DS/IN': 2001:500:f0::63#53
Apr 20 20:16:50 server1 named[1016]: error (network unreachable) resolving '125.74.in-addr.arpa/DS/IN': 2001:500:13::63#53
Apr 20 20:16:50 server1 named[1016]: error (network unreachable) resolving '74.in-addr.arpa/DNSKEY/IN': 2001:500:31::63#53
Apr 20 20:16:50 server1 named[1016]: error (network unreachable) resolving '74.in-addr.arpa/DNSKEY/IN': 2001:500:98::63#53
Apr 20 20:16:50 server1 postfix/smtpd[2493]: connect from mail-we0-f178.google.com[74.125.82.178]
Apr 20 20:16:50 server1 postfix/smtpd[2272]: connect from mail-wi0-f169.google.com[209.85.212.169]
Apr 20 20:16:50 server1 postfix/smtpd[2491]: connect from mail-wi0-f174.google.com[209.85.212.174]
Apr 20 20:16:50 server1 postfix/smtpd[2493]: NOQUEUE: reject: RCPT from mail-we0-f178.google.com[74.125.82.178]: 554 5.7.1 <postmaster@domain.dk>: Relay access denied; from=<mail@gmail.com> to=<postmaster@domain.dk> proto=ESMTP helo=<mail-we0-f178.google.com>
Apr 20 20:16:50 server1 postfix/smtpd[2493]: disconnect from mail-we0-f178.google.com[74.125.82.178]
Apr 20 20:16:50 server1 postfix/smtpd[2491]: NOQUEUE: reject: RCPT from mail-wi0-f174.google.com[209.85.212.174]: 554 5.7.1 <postmaster@domain.dk>: Relay access denied; from=<mail@gmail.com> to=<postmaster@domain.dk> proto=ESMTP helo=<mail-wi0-f174.google.com>
Apr 20 20:16:50 server1 postfix/smtpd[2272]: NOQUEUE: reject: RCPT from mail-wi0-f169.google.com[209.85.212.169]: 554 5.7.1 <postmaster@domain.dk>: Relay access denied; from=<mail@gmail.com> to=<postmaster@domain.dk> proto=ESMTP helo=<mail-wi0-f169.google.com>
Apr 20 20:16:50 server1 postfix/smtpd[2491]: disconnect from mail-wi0-f174.google.com[209.85.212.174]
Apr 20 20:16:50 server1 postfix/smtpd[2272]: disconnect from mail-wi0-f169.google.com[209.85.212.169]
__________________
Kind Regards
Dan

__________________________________________________ _______
Fixed IP/WAN
DMZ -> "ispserverip"
Primary NameServer -> ns1.myprimarynameserver.tld
Secondary NameServer -> ns2.somedomainservice.tld

Ubuntu Server 12.04.4
ISPconfig 3 v.3.0.5.2 (Single Server Setup)
NameServer: BIND v.9.8.1-P1
SquirrelMail: v.1.4.22
MailServer: PostFix v.2.9.6 - IMAP/POP3 Dovecot v.2.0.19
Database: MySQL Server v.5.5.29-0ubuntu0.12.04.2
Tutorial: "ThePerfectServer-ISPconfig3-Ubuntu12.04"

Last edited by danhansen@denmark; 20th April 2013 at 21:29. Reason: Changed "/etc/mysql/my.cf"
Reply With Quote