Sziasztok,
Feltelepitettem egy OpenBSD-es gepet postfixel,dovecote-al es mysql-el email szervernek virtualis felhasznalokkal.
A virtual_transport az dovecot es a master.cf-et is bealitottam a dovecot-al.
van egy erdekes problemam az aliasokkal. csinaltam egy kulon tablat az aliasoknak de az email amit az aliasra kuldok az nem a hiteles felhasznoloh megy be hanem az email bejon az alias userbe es letrehoza a maildir konyvart mindha egy rendes virtualis user lenne.
pelda
batman@mydomain.dom felhasznalo@mydomain.dom.
az emailt elkuldom a batman@mydomain.dom -ra bejon de nem a felhasznalo@mydomain.dom-ba kezbesiti az e-mailt hanem letrehozza a dovecot a batman postafiokot es abba kezbesiti. es ha egy rosz felhasznalohoz is kezbesitem akkor is beerkezi az email.
Valami otlet hogy honnan johet.
Elore is koszonom
- 4473 megtekintés
Hozzászólások
van par...
kezdjuk az elejen: log + config
- A hozzászóláshoz be kell jelentkezni
A kert adatok remelem nem lesz tul hoszu es olvashatora sikerul, a mydomain.dom az nem az eredeti domain cimem.
/var/log/maillog
---
Jun 7 11:35:23 mail postfix/smtpd[3043]: warning: database /etc/postfix/discard_ehlo.db is older than source file /etc/postfix/discard_ehlo
Jun 7 11:35:23 mail postfix/smtpd[3043]: connect from nm30.bullet.mail.ac4.yahoo.com[98.139.52.227]
Jun 7 11:35:25 mail postfix/smtpd[3043]: 608CD58C2B: client=nm30.bullet.mail.ac4.yahoo.com[98.139.52.227]
Jun 7 11:35:25 mail postfix/cleanup[29657]: 608CD58C2B: message-id=<595646.12711.qm@web30608.mail.mud.yahoo.com>
Jun 7 11:35:25 mail postfix/qmgr[30633]: 608CD58C2B: from=, size=2688, nrcpt=1 (queue active)
Jun 7 11:35:25 mail postfix/pipe[14105]: 608CD58C2B: to=, relay=dovecot, delay=1.8, delays=1.7/0.01/0/0.08, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 7 11:35:25 mail postfix/smtpd[3043]: disconnect from nm30.bullet.mail.ac4.yahoo.com[98.139.52.227]
Jun 7 11:35:25 mail postfix/qmgr[30633]: 608CD58C2B: removed
---
Az email bejot , egy kis reszlet a headerbol
---
"Return-Path:
X-Original-To: batman@mydomain.dom
Delivered-To: batman@mydomain.dom
Received: from nm30.bullet.mail.ac4.yahoo.com (nm30.bullet.mail.ac4.yahoo.com [98.139.52.227])
by mail.mydomain.dom (mydomain.dom) with SMTP id 608CD58C2B"
---
log a dovecot-delivery.log -bol
---
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: Loading modules from directory: /usr/local/lib/dovecot/lda
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: Module loaded: /usr/local/lib/dovecot/lda/lib90_cmusieve_plugin.so
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: auth input: uid=1010
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: auth input: gid=5000
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: auth input: home=/home/vmailbox/batman/Maildir
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: maildir: data=/home/vmailbox/batman/Maildir
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: maildir++: root=/home/vmailbox/batman/Maildir, index=, control=, inbox=/home/vmailbox/batman/Maildir
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: cmusieve: /home/vmailbox/batman/Maildir/.dovecot.sieve doesn't exist
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: cmusieve: Using sieve path: /home/vmailbox/globalsieverc
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: cmusieve: Executing script /home/vmailbox/globalsievercc
deliver(batman@mydomain.dom): Jun 07 11:35:25 Info: msgid=<595646.12711.qm@web30608.mail.mud.yahoo.com>: saved mail to INBOX
---
Log a dovecot.log -bol
---
dovecot: Jun 07 11:35:25 Info: auth(default): master in: USER 1 batman@mydomain.dom service=deliver
dovecot: Jun 07 11:35:25 Info: auth(default): master out: USER 1 batman@mydomain.dom uid=1010 gid=5000 home=/home/vmailbox/batman/Maildir
---
Es most a config-ok:
main.cf -reszlet
mydomain = mydomain.dom
myhostname = mail.mydomain.dom
myorigin = $mydomain
mydestination = localhost localhost.localdomain
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_base = /home/vmailbox
home_mailbox = Maildir/
---
master.cf -reszlet
dovecot unix - n n - - pipe
flags=ODRhu user=_vmailbox:_vmailbox argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}
probaltam O -nelkul is ugyan az a helyzet, -f ${sender} -nelkul is ugyan az a helyzet.
---
mysql_virtual_alias_maps.cf
query = SELECT destination FROM valiases AS A LEFT JOIN vdomains AS D ON A.domain_id=D.id where concat(A.source,'@',D.name)= '%s'
---
mysql_virtual_mailbox_domains.cf
query = SELECT name AS virtual FROM vdomains WHERE name='%s'
---
mysql_virtual_mailbox_maps.cf
query = select vusers.user AS User, vdomains.name AS Domain, vusers.password AS Password, CONCAT(vusers.user,'@',vdomains.name) AS 'e-mail' from vusers,vdomains where vusers.user='%u' and vusers.active='1';
---
dovecot-mysql.conf
password_query = select password from vusers where user = '%u' and active = '1'
user_query = select user from vusers where user = '%u' and active = '1'
---
dovecot.conf reszlet
protocol lda {
mail_plugins = cmusieve
mail_plugin_dir = /usr/local/lib/dovecot/lda
global_script_path = /home/vmailbox/globalsieverc
auth_socket_path = /var/dovecot/auth-master
log_path = /var/log/dovecot-deliver.log
}
auth_username_format = %Lu
auth default {
mechanisms = plain login
passdb sql {
args = /etc/dovecot/dovecot-mysql.conf
}
userdb static {
args = uid=1010 gid=5000 home=/home/vmailbox/%n/Maildir allow_all_users=yes
}
}
Hat korulbelul enyi hirtlene amire en gondoltam hogy felhasznalhato.
Koszi
- A hozzászóláshoz be kell jelentkezni
allow_all_users=yes
ha ezt kiveszed, akkor szerintem vissza fogja dobni a levelet.
Illetve az alias táblád struktúrája és tartalma is érdekes lenne, futtasd le azt a query-t pl. phpmyadmin-ban, és nézd meg mit ad vissza
- A hozzászóláshoz be kell jelentkezni