-------- Original-Nachricht -------- > Datum: Fri, 20 Nov 2009 14:47:03 +0100 (CET) > Von: Nicolas Vilz <[email protected]> > An: Steve <[email protected]> > CC: [email protected] > Betreff: Re: [Dspam-user] Configuration Problem DeliveryHost
> > -------- Original-Nachricht -------- > > > Datum: Thu, 19 Nov 2009 16:16:47 +0100 (CET) > > > Von: Nicolas Vilz <[email protected]> > > > An: [email protected] > > > Betreff: [Dspam-user] Configuration Problem DeliveryHost > > > > > Hello guys, > > > > > Hallo Nicolas, > Hallo Steve, > > > > > > > > following szenario, i have a mail server which provides personal email > > > as well as mailman mailinglists. Software is postfix, dspam, dovecot, > > > clamav and mailman. The server is supposed to use dspam as lda and > > > should give mails directly to dspam. Postfix SMTP client will use > dspam > > > as content filter. Fair enough. > > > > > > Now the tricky part: mailman will run locally, so dspam has to give > back > > > mails for my subdomain in order that the other transport will process > > > mails. So i considered Option DeliveryHost.dom.ain in dspam.conf. > First > > > i tried all Delivery-Options with Domain (i.e. DeliveryPort and so > on). > > > After looking at the source, i discovered, that this is not needed. > > > > > > Now, dspam doesn't find a DeliveryHost for my main personal mail which > > > it is supposed to pass directly to dovecot delivery agent. > > > > > > Any help with this? Do i have to hack the source to do my requirements > > > or did i miss something? > > > > > You don't need to hack the software to get that working. I have exactly > > that setup over here and I did not hacked anything to get mailman to > process > > the mail. > > > > Before I start giving you advices... Can you please post some more info > > how you have chained everything together? The stuff from master.cf is > > important, then main.cf (how do you identify mailman domains), then your > > mm_cfg.py, then your dspam.conf and last the output of "dspam > --version". > > first my master.cf: > > 127.0.0.1:10026 inet n - - - - smtpd > -o content_filter= > -o > receive_override_options=no_unknown_recipient_checks,no_header_body_checks > -o smtpd_helo_restrictions= > -o smtpd_client_restrictions= > -o smtpd_sender_restrictions= > -o smtpd_recipient_restrictions=permit_mynetworks,reject > -o mynetworks=127.0.0.0/8 > -o smtpd_authorized_xforward_hosts=127.0.0.0/8 > smtp inet n - n - - smtpd > -o content_filter=lmtp:inet:127.0.0.1:2424 > mailman unix - n n - - pipe flags=FR user=mailman > argv=/usr/lib/mailman/bin/postfix-to-mailman.py \${nexthop} ${user} > > the first entry is for giving back mail to postfix after checking. > > the second line lets postfix give mails to lda which is in my case dspam. > (dspam is listening on port 2424 in LMTP mode) > > The third is the mailman transport, which is supposed to collect... that > was > something i tried out, but it failed (i got several python errors). > > so i tried the following: > > (excerpt of my main.cf) > > .... > alias_maps = hash:/var/lib/mailman/data/aliases > .... > mydestination = $myhostname, localhost, localhost.localdomain, > lists.mydom.ain > .... > that finally worked sofar, if i let dspam give back the mails to postfix. > in the alias map, there will be the pipe mapping to the mailman scripts. > > In my dspam.conf i have the following (and the whole dspam.conf as > attachment): > > .... > TrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u" > .... > QuarantineAgent "/usr/libexec/dovecot/deliver -d %u -m SPAM" > > DeliveryHost.lists.mydom.ain 127.0.0.1 > DeliveryPort 10026 > DeliveryIdent localhost > DeliveryProto SMTP > ... > ServerPort 2424 > ... > ServerPID /var/run/dspam/dspam.pid > ServerMode standard > > > at last... my mm_cfg.py: > > MTA = 'Postfix' > DEFAULT_EMAIL_HOST = 'lists.mydom.ain' > DEFAULT_URL_HOST = 'mydom.ain' > DEFAULT_URL_PATTERN = 'https://ssl.%s/services/mailman/' > add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) > IMAGE_LOGOS = '/services/mailman/mailman-icons/' > > POSTFIX_STYLE_VIRTUAL_DOMAINS = [DEFAULT_EMAIL_HOST] > > PUBLIC_ARCHIVE_URL = > 'https://ssl.%s/services/mailman/pipermail/%(listname)s' > > --- > There was a tutorial, that includes the virtual-mailman transport table, > which > maps my subdomain to the local map. That points to the mailman scripts... > so > this is probably also obsolete now. > Ohhh boy, oh boy. You mix up things here. In your main.cf you have: alias_maps = hash:/var/lib/mailman/data/aliases Okay. This is telling that Mailman is running as a local domain. But in your mm_cfg.py you tell that Mailman is running in virtual mode: add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) POSTFIX_STYLE_VIRTUAL_DOMAINS = [DEFAULT_EMAIL_HOST] That is mixed up. Either you use a virtual Mailman setup or you use a local Mailman setup. Why mixing the both? You should at least add to main.cf: -------------- ## ## Lookup tables that alias specific mail addresses or ## domains to other local or remote address ## virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman [....other...lookup...maps....] -------------- And allow Mailman to relay: -------------- ## ## What destination domains (and subdomains thereof) this ## system will relay mail to ## relay_domains = proxy:mysql:${config_directory}/mailman_domains.cf [....other...lookup...maps....] -------------- If you use Postfix.Admin (I think you do, if I have understood your mail correctly) then your mailman_domains.cf should +/- look like this: -------------- ## mailman_domains.cf # # Description: GNU mailman domains. ## user = <your mysql user name> password = <your mysql password> dbname = <your mysql database> hosts = unix:/var/run/mysqld/mysqld.sock query = SELECT domain FROM domain WHERE domain=_latin1'%s' AND backupmx='0' AND active='1' AND FIND_IN_SET(SUBSTRING_INDEX(transport,':',1),'mailman') -------------- And now you need to tell Postfix.Admin that you have Mailman domains. In Postfix.Admin you need to add any Mailman domain into the domain table of Postfix.Admin and specify the transport to be "mailman" or "mailman:": ------- +----------------------+-----------+--------+ | domain | transport | active | +----------------------+-----------+--------+ | lists.dom.ain | mailman | 1 | | lists.anotherdom.ain | mailman | 1 | | lists.moredom.ain | mailman | 1 | | lists.etcdom.ain | mailman | 1 | +----------------------+-----------+--------+ ------- And you should remove lists.dom.ain from mydestination. The lookup table here http://www.howtoforge.org/postfix_mysql_dovecot_dspam_clamav_postgrey_rbl_debian_etch_p4 for /etc/postfix/mysql_virtual_domains_maps.cf is old. You should not try to follow How-To's for Debian if you use Gentoo. Debian has ancient stuff installed and the format used in the How-To is for Postfix < 2.2 and Gentoo (and most other distros) has long, long ago moved to Postfix 2.5.x. For a recent Postfix that table would look: ---------------- user = vmail_user password = vmail_user_password hosts = unix:/var/run/mysqld/mysqld.sock query = SELECT domain FROM domain WHERE domain=_latin1'%s' AND backupmx='0' AND active='1' ---------------- You could limit the query to just return virtual stuff back by using something like this here: ---------------- SELECT domain FROM domain WHERE domain=_latin1'%s' AND backupmx='0' AND active='1' AND FIND_IN_SET(SUBSTRING_INDEX(transport,':',1),'virtual,mailman,maildrop,dovecot,relay,smtp') ---------------- If you set up everything to be virtual, then you don't need to fiddle around with delivery in DSPAM. You could leave it as it is and Mailman will pickup the mail before it reaches the normal delivery in Postfix. Doing so you could completely remove the mailman service from master.cf in Postfix as it is not needed any more. > > the last information requested: my mailman version: > DSPAM Anti-Spam Suite 3.8.0 (agent/library) > > Copyright (c) 2002-2006 Jonathan A. Zdziarski > http://dspam.nuclearelephant.com > > DSPAM may be copied only under the terms of the GNU General Public > License, > a copy of which can be found with the DSPAM distribution kit. > > Configuration parameters: '--prefix=/usr' '--build=i686-pc-linux-gnu' > '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' > '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' > '--localstatedir=/var/lib' > '--with-storage-driver=hash_drv,mysql_drv' > '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/mail/dspam' > '--enable-daemon' '--enable-ldap' > '--enable-clamav' '--enable-large-scale' '--disable-domain-scale' > '--enable-syslog' '--disable-debug' '--disable-bnr-debug' > '--disable-verbose-debug' > '--enable-long-usernames' '--with-dspam-group=dspam' > '--with-dspam-home-group=dspam' '--with-dspam-mode=2511' > '--with-logdir=/var/log/dspam' > '--enable-virtual-users' '--enable-preferences-extension' '--disable-homedir' > '--with-mysql-includes=/usr/include/mysql' > '--with-mysql-libraries=/usr/lib/mysql' > 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 > -march=i686 -pipe' 'LDFLAGS=-Wl,-O1' > ----- > that is mail-filter/dspam-3.8.0-r15 from gentoo repository > > As you can see, i've tried out several things and haven't found my > favorite solution yet. The base configuration (without mailman) is from > > http://www.howtoforge.org/postfix_mysql_dovecot_dspam_clamav_postgrey_rbl_debian_etch > > all on one single box. Now i try to include mailman. > > at this moment right now, mailman gets mails and processes them. Personal > Mail will not be delivered because dspam doesn't find a delivery host for > all other mails. > > a lot of information, hope that helps. > > Sincerly > Nicolas -- Sarah Kreuz, die DSDS-Siegerin der Herzen, mit ihrem eindrucksvollen Debütalbum "One Moment in Time". http://portal.gmx.net/de/go/musik ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Dspam-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspam-user
