Re: [Mailman-Users] Can we use an external mail server with mailman?
game lover wrote: This is a topic I am interested in. But can someone summarize these codes to make them simple so most people can following them easily? I'm not sure what your issue is. The post you quote seems fairly self explanatory to me, especially the part written by John Dennis, but here's some information for you. The python module ASMTPdirect.py which you quote has all it's indentation removed so it doesn't have a chance of working. The original can be found in the archive of this list at http://mail.python.org/pipermail/mailman-users/2005-September/046748.html, but be aware that that code is based on Mailman 2.1.1. See below for the patch if you need it. There are actually two mail servers involved in operating Mailman. One is the server that receives mail addressed to [EMAIL PROTECTED], [EMAIL PROTECTED], etc. Call this the incoming MTA. The other is the server that receives outgoing mail from Mailman such as posts to be delivered to list members and administrative messages to be delivered to list owners and moderators. Call this the outgoing MTA. It is easy to configure the outgoing MTA to be anywhere. The mm_cfg.py settings SMTPHOST and SMTPPORT specify the host name and port used to access the outgoing MTA. Using an external outgoing MTA may be as simple as specifying SMTPHOST = 'host_name' in mm_cfg.py. The ASMTPdirect.py module comes into play if the external outgoing MTA requires user/password authorization to accept mail for an arbitrary destination. If this is required, you create Mailman/Handlers/ASMTPDirect.py by patching Mailman/Handlers/SMTPDirect.py with the patch below and you put the following in mm_cfg.py SMTP_AUTH = Yes SMTP_USERNAME = 'username' SMTP_PASSWORD = 'password' DELIVERY_MODULE = 'ASMTPDirect' Use of an external incoming MTA is more complex and requires the use of something like fetchmail, perhaps in combination with other software, on the Mailman box to retrieve the incoming mail from the external system and pipe it properly to the mail wrapper. There is a way to use a mail directory instead of the mail wrapper to deliver incoming mail to Mailman which may simplify this process. See the settings and comments for USE_MAILDIR in Defaults.py for information on this option. Here is the patch to convert Mailman 2.1.6 SMTPDirect.py to ASMTPDirect.py (watch out for wrapped lines). The patch for other 2.1.x versions is the same except for the line numbers of the second hunk. -- --- SMTPDirect.py 2005-10-14 16:31:34.62500 -0700 +++ ASMTPDirect.py 2005-10-15 19:53:39.234375000 -0700 @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -Local SMTP direct drop-off. +Local SMTP direct drop-off w/Authtenication. This module delivers messages via SMTP to a locally specified daemon. This should be compatible with any modern SMTP server. It is expected that the MTA @@ -61,6 +61,8 @@ def __connect(self): self.__conn = smtplib.SMTP() self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) +if mm_cfg.SMTP_AUTH: +self.__conn.login(mm_cfg.SMTP_USERNAME, mm_cfg.SMTP_PASSWORD) self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION def sendmail(self, envsender, recips, msgtext): --- -- Mark Sapiro [EMAIL PROTECTED] The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] Can we use an external mail server with mailman ?
This is a topic I am interested in. But can someone summarize these codes to make them simple so most people can following them easily? - http://www.FreeGame123.com All the games are free to play online. Playing is the best way of learning. Lloyd F. Tennison [EMAIL PROTECTED] wrote:Actually, I found a mod someone had written to do exactly that. In mm_cfg.py need to set these values: SMTPHOST = 'mail.newserver' #SMTP_USERNAME = 'username' #SMTP_PASSWORD = 'password' #DELIVERY_MODULE = 'SMTPDirect' DELIVERY_MODULE = 'ASMTPDirect' # Needs to be 1 for ASMTPDirect to work SMTP_AUTH = 1 and use the attached ASMTPDirect file. I no longer use this, so this has not been updated to 2.16, so you mau want to check it all out. The was orginally received from someone else on this list, so I do not take credit for it. From: John Dennis To: julien grosjean Date sent: Fri, 23 Sep 2005 10:53:12 -0400 Copies to: mailman-users@python.org Subject: Re: [Mailman-Users] Can we use an external mail server with mailman ? On Fri, 2005-09-23 at 16:27 +0200, julien grosjean wrote: MAIL SERVER DETAILS My Mail Server is NOT on the same server than my mailman server... My mail server is proxiad.com (217.109.179.10) with smtp.proxiad.com and pop.proxiad.com (This server requiert an authentification... ) My mailman server is extranet-proxiad.com (193.252.219.206) All emails are create on the mail server. The mail server receive the mail correctly. With my mail client, [EMAIL PROTECTED] receive the mail, but not suscribers... THE PROBLEM : I create a test list via web interface. We can suscribe to the list, but the problem is than when we sent an email to the list email, such as [EMAIL PROTECTED], just this email receive the mail... Only [EMAIL PROTECTED] receive the mail from the sender... Is there a configuration to make ? Perhaps there is an aliases problem ? Should aliases be on the mail server or on the mailman server ? Part of the problem is the term mail server can be confusing because there are two mail servers in the picture, a receiving mail server and a sending mail server. Mailman needs run on the same machine the receiving mail server is on otherwise your aliases will not work. The reason is because when the receving mail server receives an email destined for a mailman list the mail server will via its aliases determine the destination for that list email is a program called mailman, thats what all those aliases are all about. The receiving mail server then hands the incoming list email to the program mailman. It can only give it to the program mailman if mailman is running on the same machine. Mailman in turn takes the email it received and looks up all the members of the list and forwards the email to each of them. To do this mailman invokes a sending mail server. Often the sending and receiving mail servers (SMTP) are the same and run on the same box. But you can direct mailman to use a different sending SMTP server via the SMTPHOST variable. Summary: mailman and the receiving SMTP server must be on the same machine. You description is a bit confusing because the way I read it mailman has in fact received the list email (your previous post shows mailman sending smtp posts). It could only have done that if it the its running on the same machine as the receiving SMTP server and the aliaes are correct. I suspect what actually occurred is those are examples from mail sent on the machine mailman is running on where everything will resolve correctly. -- John Dennis -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40viplist.us Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showfile=faq01.027.htp # Copyright (C) 1998-2003 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Local SMTP direct drop-off w
Re: [Mailman-Users] Can we use an external mail server with mailman ?
Actually, I found a mod someone had written to do exactly that. In mm_cfg.py need to set these values: SMTPHOST = 'mail.newserver' #SMTP_USERNAME = 'username' #SMTP_PASSWORD = 'password' #DELIVERY_MODULE = 'SMTPDirect' DELIVERY_MODULE = 'ASMTPDirect' # Needs to be 1 for ASMTPDirect to work SMTP_AUTH = 1 and use the attached ASMTPDirect file. I no longer use this, so this has not been updated to 2.16, so you mau want to check it all out. The was orginally received from someone else on this list, so I do not take credit for it. From: John Dennis [EMAIL PROTECTED] To: julien grosjean [EMAIL PROTECTED] Date sent: Fri, 23 Sep 2005 10:53:12 -0400 Copies to: mailman-users@python.org Subject:Re: [Mailman-Users] Can we use an external mail server with mailman ? On Fri, 2005-09-23 at 16:27 +0200, julien grosjean wrote: MAIL SERVER DETAILS My Mail Server is NOT on the same server than my mailman server... My mail server is proxiad.com (217.109.179.10) with smtp.proxiad.com and pop.proxiad.com (This server requiert an authentification... ) My mailman server is extranet-proxiad.com (193.252.219.206) All emails are create on the mail server. The mail server receive the mail correctly. With my mail client, [EMAIL PROTECTED] receive the mail, but not suscribers... THE PROBLEM : I create a test list via web interface. We can suscribe to the list, but the problem is than when we sent an email to the list email, such as [EMAIL PROTECTED], just this email receive the mail... Only [EMAIL PROTECTED] receive the mail from the sender... Is there a configuration to make ? Perhaps there is an aliases problem ? Should aliases be on the mail server or on the mailman server ? Part of the problem is the term mail server can be confusing because there are two mail servers in the picture, a receiving mail server and a sending mail server. Mailman needs run on the same machine the receiving mail server is on otherwise your aliases will not work. The reason is because when the receving mail server receives an email destined for a mailman list the mail server will via its aliases determine the destination for that list email is a program called mailman, thats what all those aliases are all about. The receiving mail server then hands the incoming list email to the program mailman. It can only give it to the program mailman if mailman is running on the same machine. Mailman in turn takes the email it received and looks up all the members of the list and forwards the email to each of them. To do this mailman invokes a sending mail server. Often the sending and receiving mail servers (SMTP) are the same and run on the same box. But you can direct mailman to use a different sending SMTP server via the SMTPHOST variable. Summary: mailman and the receiving SMTP server must be on the same machine. You description is a bit confusing because the way I read it mailman has in fact received the list email (your previous post shows mailman sending smtp posts). It could only have done that if it the its running on the same machine as the receiving SMTP server and the aliaes are correct. I suspect what actually occurred is those are examples from mail sent on the machine mailman is running on where everything will resolve correctly. -- John Dennis [EMAIL PROTECTED] -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40viplist.us Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp # Copyright (C) 1998-2003 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Local SMTP direct drop-off w/Authtenication. This module delivers messages via SMTP to a locally specified daemon. This should be compatible with any modern SMTP server. It is expected that the MTA handles all final delivery. We have to play tricks
[Mailman-Users] Can we use an external mail server with mailman ?
Hi everybody, I have a problem for the configuration of mailman with an external mail server Here is a complement of informations about my first mail : http://www.mail-archive.com/mailman-users%40python.org/msg34423.html SETUP DETAILS : I install mailman 2.1.5 on my CentOS distro. I setup mm_cfg conf file like this : ##start file DEFAULT_URL_HOST = 'extranet-proxiad.com' DEFAULT_EMAIL_HOST = 'proxiad.com' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) IMAGE_LOGOS = '/icons/' MTA = 'Postfix' ###end file MAIL SERVER DETAILS My Mail Server is NOT on the same server than my mailman server... My mail server is proxiad.com (217.109.179.10) with smtp.proxiad.com and pop.proxiad.com (This server requiert an authentification... ) My mailman server is extranet-proxiad.com (193.252.219.206) All emails are create on the mail server. The mail server receive the mail correctly. With my mail client, [EMAIL PROTECTED] receive the mail, but not suscribers... THE PROBLEM : I create a test list via web interface. We can suscribe to the list, but the problem is than when we sent an email to the list email, such as [EMAIL PROTECTED], just this email receive the mail... Only [EMAIL PROTECTED] receive the mail from the sender... Is there a configuration to make ? Perhaps there is an aliases problem ? Should aliases be on the mail server or on the mailman server ? here is my /etc/aliases file : mailman: |/usr/lib/mailman/mail/mailman post mailman mailman-admin:|/usr/lib/mailman/mail/mailman admin mailman mailman-bounces: |/usr/lib/mailman/mail/mailman bounces mailman mailman-confirm: |/usr/lib/mailman/mail/mailman confirm mailman mailman-join: |/usr/lib/mailman/mail/mailman join mailman mailman-leave:|/usr/lib/mailman/mail/mailman leave mailman mailman-owner:|/usr/lib/mailman/mail/mailman owner mailman mailman-request: |/usr/lib/mailman/mail/mailman request mailman mailman-subscribe:|/usr/lib/mailman/mail/mailman subscribe mailman mailman-unsubscribe: |/usr/lib/mailman/mail/mailman unsubscribe mailman test: |/usr/lib/mailman/mail/mailman post test test-admin:|/usr/lib/mailman/mail/mailman admin test test-bounces: |/usr/lib/mailman/mail/mailman bounces test test-confirm: |/usr/lib/mailman/mail/mailman confirm test test-join: |/usr/lib/mailman/mail/mailman join test test-leave:|/usr/lib/mailman/mail/mailman leave test test-owner:|/usr/lib/mailman/mail/mailman owner test test-request: |/usr/lib/mailman/mail/mailman request test test-subscribe:|/usr/lib/mailman/mail/mailman subscribe test test-unsubscribe: |/usr/lib/mailman/mail/mailman unsubscribe test I ran newaliases command. I am aware that there is a flag to prevent a sender from receiving their own post... Logs are not very usefull... no error is reported... Can we use an external mail server with mailman running on another server ? All advices are welcome... Many thanks... -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] Can we use an external mail server with mailman ?
On Fri, 2005-09-23 at 16:27 +0200, julien grosjean wrote: MAIL SERVER DETAILS My Mail Server is NOT on the same server than my mailman server... My mail server is proxiad.com (217.109.179.10) with smtp.proxiad.com and pop.proxiad.com (This server requiert an authentification... ) My mailman server is extranet-proxiad.com (193.252.219.206) All emails are create on the mail server. The mail server receive the mail correctly. With my mail client, [EMAIL PROTECTED] receive the mail, but not suscribers... THE PROBLEM : I create a test list via web interface. We can suscribe to the list, but the problem is than when we sent an email to the list email, such as [EMAIL PROTECTED], just this email receive the mail... Only [EMAIL PROTECTED] receive the mail from the sender... Is there a configuration to make ? Perhaps there is an aliases problem ? Should aliases be on the mail server or on the mailman server ? Part of the problem is the term mail server can be confusing because there are two mail servers in the picture, a receiving mail server and a sending mail server. Mailman needs run on the same machine the receiving mail server is on otherwise your aliases will not work. The reason is because when the receving mail server receives an email destined for a mailman list the mail server will via its aliases determine the destination for that list email is a program called mailman, thats what all those aliases are all about. The receiving mail server then hands the incoming list email to the program mailman. It can only give it to the program mailman if mailman is running on the same machine. Mailman in turn takes the email it received and looks up all the members of the list and forwards the email to each of them. To do this mailman invokes a sending mail server. Often the sending and receiving mail servers (SMTP) are the same and run on the same box. But you can direct mailman to use a different sending SMTP server via the SMTPHOST variable. Summary: mailman and the receiving SMTP server must be on the same machine. You description is a bit confusing because the way I read it mailman has in fact received the list email (your previous post shows mailman sending smtp posts). It could only have done that if it the its running on the same machine as the receiving SMTP server and the aliaes are correct. I suspect what actually occurred is those are examples from mail sent on the machine mailman is running on where everything will resolve correctly. -- John Dennis [EMAIL PROTECTED] -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] Can we use an external mail server with mailman ?
On Fri, 2005-09-23 at 16:27 +0200, julien grosjean wrote: DEFAULT_EMAIL_HOST = 'proxiad.com' My mailman server is extranet-proxiad.com (193.252.219.206) We can suscribe to the list, but the problem is than when we sent an email to the list email, such as [EMAIL PROTECTED], Sorry, I should have said this in my last email. This will not work. You are tyring to send mail to proxiad.com but mailman is on extranet-proxiad.com. proxiad.com won't know what to do with the mail, Unless proxiad.com knows to relay the mail to extranet-proxiad.com. Issues of relaying and SMTP configuration are outside the scope of the mailman-users list. You will need to learn what the SMTP server is on proxiad.com and configure it correctly. Or, locate everything on one server. -- John Dennis [EMAIL PROTECTED] -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp