postfix and mailing list, internal or mailman

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

postfix and mailing list, internal or mailman

David Mehler
Hello,
I'm running postfix 2.4.5 on an fc6 vps. I'm wanting to set up a small at
least initially, mailing list that for the moment will be announcements
only, but later might have to expand to include discussions. I'm running a
single postfix virtual mailbox domain and am trying to get mailman going,
and am not having much luck. I'm reading docs and howtos, but they all seem
to say use a postfix virtual alias domain, this is not what I'm using so
that wouldn't work.
        So thinking I'm overcomplicating things I pulled out my copy of
"Postfix The Definitive Guide" and set up a list via postfix's alias
facility. I've created a file /etc/postfix/mail_lists which has an owner and
a request alias and points to a file that contains the email addresses of my
subscribers. I ran newaliases and sent a message. I got an error from
virtual stating that the user for the list did not exist, it's an alias not
a user, I am stuck.
I hope this makes sense.
        Thanks.
Dave.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postfix and mailing list, internal or mailman

mouss-2
dave wrote:

> Hello,
> I'm running postfix 2.4.5 on an fc6 vps. I'm wanting to set up a small at
> least initially, mailing list that for the moment will be announcements
> only, but later might have to expand to include discussions. I'm running a
> single postfix virtual mailbox domain and am trying to get mailman going,
> and am not having much luck. I'm reading docs and howtos, but they all seem
> to say use a postfix virtual alias domain, this is not what I'm using so
> that wouldn't work.
> So thinking I'm overcomplicating things I pulled out my copy of
> "Postfix The Definitive Guide" and set up a list via postfix's alias
> facility. I've created a file /etc/postfix/mail_lists which has an owner and
> a request alias and points to a file that contains the email addresses of my
> subscribers. I ran newaliases and sent a message. I got an error from
> virtual stating that the user for the list did not exist, it's an alias not
> a user, I am stuck.
> I hope this makes sense.
>  

Next time, follow
    http://www.postfix.org/DEBUG_README.html#mail
You provided a summary of two problems, which is a good start, but you
forgot the other points (logs, postconf -n, ...).


my guess is that you are using a virtual (mailbox) domain but you only
use alias_maps. alias_maps are only used for local domains (domains
listed in mydestination), so no amount of newaliases will make a virtual
user exist.

what you can do is use virtual_alias_maps to redirect the virtual user
to a local user:
[hidden email]   [hidden email]
where "lists.example.com" is declared in mydestination. Then you can use
alias_maps.







Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: postfix and mailing list, internal or mailman

David Mehler
Hello,
Thanks for your reply. I've included postconf -n output below along with a
log transaction. My domain is a virtual mailbox domain, the address being
sent to is not a local user.
        Thanks.
Dave.



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of mouss
Sent: Monday, May 19, 2008 2:59 AM
Cc: [hidden email]
Subject: Re: postfix and mailing list, internal or mailman

dave wrote:
> Hello,
> I'm running postfix 2.4.5 on an fc6 vps. I'm wanting to set up a small at
> least initially, mailing list that for the moment will be announcements
> only, but later might have to expand to include discussions. I'm running a
> single postfix virtual mailbox domain and am trying to get mailman going,
> and am not having much luck. I'm reading docs and howtos, but they all
seem
> to say use a postfix virtual alias domain, this is not what I'm using so
> that wouldn't work.
> So thinking I'm overcomplicating things I pulled out my copy of
> "Postfix The Definitive Guide" and set up a list via postfix's alias
> facility. I've created a file /etc/postfix/mail_lists which has an owner
and
> a request alias and points to a file that contains the email addresses of
my
> subscribers. I ran newaliases and sent a message. I got an error from
> virtual stating that the user for the list did not exist, it's an alias
not
> a user, I am stuck.
> I hope this makes sense.
>  

Next time, follow
    http://www.postfix.org/DEBUG_README.html#mail
You provided a summary of two problems, which is a good start, but you
forgot the other points (logs, postconf -n, ...).


my guess is that you are using a virtual (mailbox) domain but you only
use alias_maps. alias_maps are only used for local domains (domains
listed in mydestination), so no amount of newaliases will make a virtual
user exist.

what you can do is use virtual_alias_maps to redirect the virtual user
to a local user:
[hidden email]   [hidden email]
where "lists.example.com" is declared in mydestination. Then you can use
alias_maps.








output.txt (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Setting up a third MX

Sripati Prasad padhy
Hi Team,

I am setting up an office in Dubai, however I want that I install the
Secondary Mx that place & get all the authentication done  from the Main
Exchange. Please guide, Any Mails comming to my domain should be only
relayed to the secondary MX present in the Dubai Office.

Regards
Sripati

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postfix and mailing list, internal or mailman

mouss-2
In reply to this post by David Mehler
dave wrote:
> Hello,
> Thanks for your reply. I've included postconf -n output below along with a
> log transaction. My domain is a virtual mailbox domain, the address being
> sent to is not a local user.
>  


you need a virtual alias to redirect the virtual user to a local user:

[hidden email]   podcast@localhost

(as long as localhost is in mydestination)

then you can use alias_maps for the podcast user because
podcast@localhost is local (because you have localhost in  mydestination)




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postfix and mailing list, internal or mailman

mouss-2
In reply to this post by David Mehler
dave wrote:
> Hi,
> Thanks for your reply. I did that, and am still getting the same
> error.
> I'm thinking mailman would be more of what I'm looking for, but that
> error is the same with it.
>  


please keep the discussion on the list. many people know more than I do.
so don't lose the opportunity to get their help.

and don't say "I did that", because "that" does not exist. you must
chose one problem (you can't get help if you don't decide what problem
you are trying to solve), and post informations:
- output of 'postconf -n'
- relevant logs
- content of relevant maps

(yes, you need to do so whenever you change your configuration).


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postfix and mailing list, internal or mailman

Jonathan Dill

On May 21, 2008, at 4:25 PM, mouss wrote:

> dave wrote:
>> Hi,
>> Thanks for your reply. I did that, and am still getting the same
>> error.
>> I'm thinking mailman would be more of what I'm looking for, but that
>> error is the same with it.
>>
>
>
> please keep the discussion on the list. many people know more than I  
> do. so don't lose the opportunity to get their help.

Yes, also I have been following the conversation with interest for my  
own reference although I don't have any answers.

Perhaps you could glean some clues from the postfix section in the  
mailman install manual?

http://www.list.org/mailman-install/node12.html

Also take a look at the subsections and external links.  Hopefully,  
that helps rather than makes things more confusing.

For mailman, some of the info out there seems to confuse settings for  
virtual domains and settings for aliases without virtual domains, I  
think you have to have one type of set up or the other, if you try to  
use both at the same time it is going to cause problems.  That is  
where it would really help for you to send the output of 'postconf -n'  
and log entries.

For what it's worth, I haven't had much luck with mailman installed  
from package repositories on various flavors of linux (often, the  
packager seems to make assumptions that happen to work for a very  
specific configuration, but break things for a slightly different  
configuration).  I have had much better results installing from source  
code, it's not difficult to compile and install.

For "announce only" type list, you might take a look at http://www.phplist.com/ 
  but you might end up running into similar problems if some basic  
issue with postfix is not resolved.

>
>
> and don't say "I did that", because "that" does not exist. you must  
> chose one problem (you can't get help if you don't decide what  
> problem you are trying to solve), and post informations:
> - output of 'postconf -n'
> - relevant logs
> - content of relevant maps
>
> (yes, you need to do so whenever you change your configuration).
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postfix and mailing list, internal or mailman

mouss-2
Jonathan Dill wrote:
>
> Yes, also I have been following the conversation with interest for my
> own reference although I don't have any answers.
>
> [snip]

Here is an example setup where list addresses are of the form
    [hidden email]
(so you have the addresses: [hidden email], ... etc).

WARNING. This was very quickly tested.

- install mailman :)

- At the end of mm_cfg.py, add

DEFAULT_URL_HOST   = 'www.example.com'
DEFAULT_URL_PATTERN = '<a href="https://%s/mailman/'">https://%s/mailman/'
DEFAULT_EMAIL_HOST = 'lists.example.com'
SMTPHOST = '127.0.0.1'
SMTPPORT = 10025

the last 2 settings are to avoid refiltering mail (it was already
filtered when it was received). They are not essential.

- add lists.example.com to your virtual_mailbox_domains
(you can use other domain classes if you want)

- for every list, add
${list}@lists.example.com      /some/path

to your virtual_mailbox_maps. This is mostly for recipient validation.
but if you decide to do something else (like saving posts to a
maildir... etc), it may come in handy.

- set
owner_request_special = no

in your main.cf. we handle -owner and -request by ourselves.


- set
recipient_delimiter = -

(if you use '+', you'll have to do some work).

- now, since '-' is the recipient_delimiter, every
${list}-[hidden email] is accepted. This will generate a
bounce. so we block it with check_recipient_access (pcre follows) [do
this in smtpd_sender_restrictions for "safety"]

/\-(admin|bounces|confirm|join|leave|owner|request|subscribe|unsubscribe)@lists\.example\.com$/
DUNNO
/\-.*@lists\.example\.com$/     550 5.1.1 Invalid address: unknown list
command


- set a transport entry:
lists.example.com   mailman:

- in master.cf, add something like:
mailman unix  -       n       n       -       -       pipe
      flags=qR user=mailman:mailman
      argv=/path/to/postfix-to-mailman.sh  ${user} ${extension}

- the script /path/to/postfix-to-mailman.sh (don't forget to make it
executable) contains something like:
#!/bin/sh
# quick and dirty script...

list="$1"
command="$2"
# adjust the following path
mailman=/usr/local/mailman/mail/mailman

EX_TEMPFAIL=75
if [ -z ${list} ]; then
    echo "no list specified"
    exit $EX_TEMPFAIL;
fi

if [ -z ${command} ]; then
    command=post
fi

#debugging:
#echo "cmd=$command, list=$list" >> /tmp/mailm.log


# you can check for valid commands here if you really want.
# you could redirect them to -owner or discard tjem or whatever...

cat | $mailman $command $list
############# end of quick and dirty script

- Apache config is beyond the scope here.

*) an alternative is to use a local domain: declare lists.example.com in
mydestination and setup the aliases (in /etc/whatever/aliases) as shown
by mailman "newlist" command.

*) if your lists use the same domain as usual mail, such as
[hidden email], then use a virtual alias:
[hidden email]      [hidden email]
to redirect it to a lists dedicated domain (or to
[hidden email] if you use a local domain).








Loading...