LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix relay to ISP's auth smtp server (https://www.linuxquestions.org/questions/linux-server-73/postfix-relay-to-isps-auth-smtp-server-691641/)

henkie32 12-19-2008 03:05 AM

Postfix relay to ISP's auth smtp server
 
Hi guys,


I installed a mail package named zarafa, the zarafa-spooler deamon handles the outgoing mail and can not handle auth smtp servers.....

since my ISP uses auth smtp i need to relay everything that comes in to localhost to my ISP's auth smtp server.


Somehow postfix tries to look every domain i want to send an email to up in the mysql database (since it does that also for incoming mails, since my mail users are virtual stored in mysql).


What could cause this?

Setup: Gentoo Linux, Mysql, Postfix with sasl support build in.

The error message:

Code:

Dec 14 15:16:55 bertje postfix/smtpd[23739]: connect from unknown[127.0.0.1]
Dec 14 15:16:55 bertje postfix/trivial-rewrite[23741]: warning: table "mysql:/etc/postfix/mysql-aliases.cf": empty lookup result for: "mylocaldomain.nl" -- ignored
Dec 14 14:16:55 bertje postfix/trivial-rewrite[23741]: warning: table "mysql:/etc/postfix/mysql-aliases.cf": empty lookup result for: "remotedomain.com" -- ignored
Dec 14 14:16:55 bertje postfix/smtpd[23739]: 8635910028: client=unknown[127.0.0.1]
Dec 14 15:16:55 bertje postfix/cleanup[23744]: 8635910028: message-id=<vmime.49451557.68a8.aefb7432fe897e9e@bertje.prutsers.biz>
Dec 14 15:16:55 bertje postfix/qmgr[23630]: 8635910028: from=<me@mylocaldomain.nl>, size=1857, nrcpt=1 (queue active)
Dec 14 14:16:55 bertje postfix/trivial-rewrite[23741]: warning: table "mysql:/etc/postfix/mysql-aliases.cf": empty lookup result for: "remotedomain.com" -- ignored
Dec 14 14:16:55 bertje postfix/smtpd[23739]: disconnect from unknown[127.0.0.1]
Dec 14 15:16:55 bertje postfix/qmgr[23630]: 8635910028: to=<someone@remotedomain.com.com>, relay=none, delay=0.16, delays=0.15/0.01/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)


main.cf

Code:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

append_dot_mydomain = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

mydomain = xxx.biz
myhostname = bertje
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_password
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
myorigin = xxx.biz
mydestination = $myhostname, $myhostname.local, localhost, $mydomain
mynetworks = 127.0.0.0/8
inet_interfaces = all

mailbox_command = /usr/bin/zarafa-dagent -R ${recipient}
mailbox_transport = zarafa:
zarafa_destination_recipient_limit = 1

master.cf
Code:

smtp      inet  n      -      -      -      -      smtpd

zarafa unix - n n - 10 pipe flags= user=vmail argv=/usr/bin/zarafa-dagent -R ${recipient}


#628      inet  n      -      -      -      -      qmqpd
pickup    fifo  n      -      -      60      1      pickup
cleanup  unix  n      -      -      -      0      cleanup
qmgr      fifo  n      -      n      300    1      qmgr
#qmgr    fifo  n      -      -      300    1      oqmgr
tlsmgr    unix  -      -      -      1000?  1      tlsmgr
rewrite  unix  -      -      -      -      -      trivial-rewrite
bounce    unix  -      -      -      -      0      bounce
defer    unix  -      -      -      -      0      bounce
trace    unix  -      -      -      -      0      bounce
verify    unix  -      -      -      -      1      verify
flush    unix  n      -      -      1000?  0      flush
proxymap  unix  -      -      n      -      -      proxymap
smtp      unix  -      -      -      -      -      smtp

relay    unix  -      -      -      -      -      smtp
  -o fallback_relay=

showq    unix  n      -      -      -      -      showq
error    unix  -      -      -      -      -      error
discard  unix  -      -      -      -      -      discard
local    unix  -      n      n      -      -      local
virtual  unix  -      n      n      -      -      virtual
lmtp      unix  -      -      -      -      -      lmtp
anvil    unix  -      -      -      -      1      anvil
scache    unix  -  -  -  -  1  scache

maildrop  unix  -      n      n      -      -      pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp      unix  -      n      n      -      -      pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail    unix  -      n      n      -      -      pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp    unix  -      n      n      -      -      pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -  n  n  -  2  pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman  unix  -      n      n      -      -      pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}


Berhanie 12-19-2008 03:08 PM

Quote:

Somehow postfix tries to look every domain i want to send an email to up in the mysql database (since it does that also for incoming mails, since my mail users are virtual stored in mysql).
Mail you send out is first received by postfix, then delivered (sent). When it is received, it is treated
like any other incoming mail, which is why the mysql lookup for virtual aliasing takes place.

Oh, and welcome to LQ.

henkie32 12-22-2008 12:26 AM

How can i get postfix to relay everything else then the known mails to my ISP's auth smtp server??

billymayday 12-22-2008 12:45 AM

Something like
Code:

relayhost = [smtp.myisp.com]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/isppasswd
smtp_tls_security_level = may

in main.cf

/etc/postfix/isppasswd
Code:

[smtp.myisp.com]      username:password
Don't forget to "postmap /etc/isppasswd"

acantonyclark1 07-05-2012 12:50 AM

Zarafa mail error troubleshoot
 
Usually the trouble arises due to corruption of Zarafa database that stores and manage all your incoming and outgoing emails. When it gets damaged then you may have problem in postfix relay to ISP's auth smtp server. In such case, sometime data on the server get lost for which you will need to run Zarafa Mail Recovery program. The program will recover your inaccessible emails and will fix the issues.

Michellelouis 08-30-2012 03:20 AM

In the case if you are getting errors while Zarafa accessing Zarafa database or mails than you need not to worry as Zarafa mail repair tool is an efficient software that provides best solution to repair and recover corrupted or damaged frm & .ibdata1 file of zarafa database. It conmes embed with highly adavanced scanning algorithm that easily repairs and restore lost data in almost all data loss situations. Zarafa mail repair tool offers best solution to solve problems related with zarafa database.


All times are GMT -5. The time now is 08:41 AM.