HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix not sending mails to any outside domain except my own (http://www.howtoforge.com/forums/showthread.php?t=58568)

lazacom 6th September 2012 11:54

Postfix not sending mails to any outside domain except my own
 
Postfix is sending emails only for my domain, nemogucamisija.com. But not to gmail or any other. User however can receive emails from any mail servers (gmail, yahoo... ). Here is /var/log/maillog output:

Quote:

Sep 6 11:17:09 server02 postfix/smtpd[30377]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 11:17:09 server02 postfix/proxymap[30378]: error: open /etc/postfix/mysql-virtual_mailboxes.cf: No such file or directory
Sep 6 11:17:09 server02 postfix/smtpd[30377]: connect from 109-92-11-38.dynamic.isp.telekom.rs[109.92.11.38]
Sep 6 11:17:09 server02 postfix/proxymap[30378]: error: open /etc/postfix/mysql-virtual_domains.cf: No such file or directory
Sep 6 11:17:09 server02 postfix/trivial-rewrite[30380]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport"
Sep 6 11:17:10 server02 postfix/master[26436]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30380 exit status 1
Sep 6 11:17:10 server02 postfix/master[26436]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Sep 6 11:17:18 server02 dovecot: pop3-login: Disconnected (auth failed, 1 attempts): user=<office@nemogucamisija.com>, method=PLAIN, rip=109.121.92.53, lip=5.$
Sep 6 11:18:10 server02 postfix/trivial-rewrite[30390]: fatal: open dictionary: expecting "type:name" form instead of "/etc/postfix/transport"
Sep 6 11:18:11 server02 postfix/master[26436]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30390 exit status 1
Sep 6 11:18:11 server02 postfix/master[26436]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Any idea? Thanks in advance!

TiTex 6th September 2012 12:24

post the output of postconf -n ... or the content of main.cf

till 6th September 2012 12:30

There are some config files missing.

If you use ISPConfig then download ispconfig again, unpack it and run the update.php script which is in the install folder. Choose yes when the updater asks you if the services shall be reconfigured.

If your setup is not a ispconfig server, then you might want to redo the guide that you used to setupthe server and create the missing config files manually.

lazacom 6th September 2012 12:43

postconf -n

Quote:

allow_untrusted_routing = yes
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
ignore_mx_lookup_error = yes
inet_protocols = ipv4
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = nemogucamisija.com, localhost, localhost.nemogucamisija.com
mydomain = nemogucamisija.com
myhostname = nemogucamisija.com
mynetworks = 127.0.0.0/8 [::1]/128
myorigin = nemogucamisija.com
newaliases_path = /usr/bin/newaliases
notify_classes = bounce, 2bounce, delay, policy, protocol, resource, software
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_tls_security_level = none
transport_maps = /etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000
Yes, I have tried ISPConfig, but it could not install, so i decided not to go ISPConfig route. I instead installed webmin+virtualmin.

lazacom 6th September 2012 12:44

And yes, this is postfix 2.9.4 on Ceont0s 6 x86_64, built from source (as root). Had to remove 2.6 cause of ISPConfig ...

TiTex 6th September 2012 12:54

if i'm not mistaken
Quote:

transport_maps = /etc/postfix/transport
should be
Code:

transport_maps = hash:/etc/postfix/transport
but first run this command
Code:

postmap /etc/postfix/transport
and then restart postfix

lazacom 6th September 2012 13:00

Tried, but got error:
Quote:

[root@server02 ~]# postmap /etc/postfix/transport
postmap: fatal: open database /etc/postfix/transport.db: Permission denied

lazacom 6th September 2012 14:33

Also, I created all missing files from first post, chown-ed them to postfix:postfix, but now i got some other errors (restart postfix + mail delivery):
Quote:

Sep 6 14:28:36 server02 postfix/postfix-script[1890]: stopping the Postfix mail system
Sep 6 14:28:36 server02 postfix/master[1037]: terminating on signal 15
Sep 6 14:28:37 server02 postfix/postfix-script[1949]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:37 server02 postfix/postfix-script[1950]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:37 server02 postfix/postfix-script[1951]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:37 server02 postfix/postfix-script[1953]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:37 server02 postfix/postfix-script[1954]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:37 server02 postfix/postfix-script[1955]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:37 server02 postfix/postfix-script[1956]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:37 server02 postfix/postqueue[1972]: warning: Mail system is down -- accessing queue directly
Sep 6 14:28:38 server02 postfix/postfix-script[2033]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2034]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:38 server02 postfix/postfix-script[2035]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:38 server02 postfix/postfix-script[2037]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:38 server02 postfix/postfix-script[2038]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:38 server02 postfix/postfix-script[2039]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2040]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:38 server02 postfix/postfix-script[2055]: starting the Postfix mail system
Sep 6 14:28:38 server02 postfix/master[2056]: daemon started -- version 2.9.4, configuration /etc/postfix
Sep 6 14:28:38 server02 postfix/postfix-script[2115]: warning: not owned by root: /etc/postfix/mysql-virtual_mailboxes.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2116]: warning: not owned by root: /etc/postfix/transport
Sep 6 14:28:38 server02 postfix/postfix-script[2117]: warning: not owned by root: /etc/postfix/transport.db
Sep 6 14:28:38 server02 postfix/postfix-script[2119]: warning: group or other writable: /etc/postfix/./virtual.rpmsave
Sep 6 14:28:38 server02 postfix/postfix-script[2120]: warning: group or other writable: /etc/postfix/./transport
Sep 6 14:28:38 server02 postfix/postfix-script[2121]: warning: group or other writable: /etc/postfix/./mysql-virtual_transports.cf
Sep 6 14:28:38 server02 postfix/postfix-script[2122]: warning: group or other writable: /etc/postfix/./virtual.db
Sep 6 14:28:43 server02 postfix/smtpd[2145]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 6 14:28:43 server02 postfix/proxymap[2148]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:28:43 server02 dovecot: pop3-login: Login: user=<office.nemogucamisija>, method=PLAIN, rip=109.92.11.38, lip=5.9.223.46, mpid=2151, TLS
Sep 6 14:28:43 server02 dovecot: pop3(office.nemogucamisija): Disconnected: Logged out top=0/0, retr=0/0, del=0/17, size=117576
Sep 6 14:28:44 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:28:44 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2148 exit status 1
Sep 6 14:28:45 server02 postfix/proxymap[2152]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:28:46 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:28:46 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2152 exit status 1
Sep 6 14:28:46 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Sep 6 14:30:47 server02 postfix/proxymap[2184]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:30:48 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:30:48 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2184 exit status 1
Sep 6 14:30:48 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Sep 6 14:31:26 server02 dovecot: pop3-login: Login: user=<office.nemogucamisija>, method=PLAIN, rip=109.92.11.38, lip=5.9.223.46, mpid=2211, TLS
Sep 6 14:31:26 server02 dovecot: pop3(office.nemogucamisija): Disconnected: Logged out top=0/0, retr=0/0, del=0/17, size=117576
Sep 6 14:31:48 server02 postfix/proxymap[2214]: fatal: /etc/postfix/mysql-virtual_mailboxes.cf: bad string length 0 < 1: dbname =
Sep 6 14:31:49 server02 postfix/smtpd[2145]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep 6 14:31:49 server02 postfix/master[2056]: warning: process /usr/libexec/postfix/proxymap pid 2214 exit status 1
Sep 6 14:31:49 server02 postfix/master[2056]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Any way to reset settings to default or some command to rebuild config files?

till 6th September 2012 14:39

Quote:

Any way to reset settings to default or some command to rebuild config files?
You said above in #5 that you use ispconfig and I explained in #3 how o reset the config files on a ispconfig server.

lazacom 6th September 2012 14:50

I perhaps didn't explained it right - I tried to install ISPConfig, but installation failed. Then, I uninstaled ISPConfig and deleted what left and installed webmin+virtualmin. Because some settings still was left from ISP, I removed postfix (yum remove postfix) and then build postfix 2.9.4 from source as root.

Unfortunately, server gone live, web site must be running so some switch to ISPconfig is not a option now. Is there some own postfix solution to rebuild settings, or something in webmin/virtualmin?


All times are GMT +2. The time now is 11:23.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.