This is a discussion on required help for all@domain.com within the mailing.postfix.users forums, part of the Mail Servers and Related category; Suneel, Here's a script that make our 'all' alias - you need to add a reference to the alias file ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Suneel,
Here's a script that make our 'all' alias - you need to add a reference to the alias file in main.cf - eg: virtual_alias_maps = hash:/etc/postfix/virtual, hash:/etc/postfix/allusers Here's the script - replace the bits indicated to match your requirements: ######### #NK This script reads the passwd file and uses it to create a postfix alias file that sends email to all users #The script keeps a copy of the new 'allusers' file created in root's home folder. echo -e -n "all@**OURDOMAINNAME**.com\t\t" > /root/allusers.tmp #Only include accounts with UIDs between 501 and 999 awk -F: '$3 > 500 && $3 < 1000 { name = $1"@**HOSTNAME**,"; printf (name) }' /etc/passwd >> /root/allusers.tmp #Remove the trailing comma... awk '{print (substr ($0 , 1, length ($0)-1))}' /root/allusers.tmp > /root/allusers #Remove temp file rm -r /root/allusers.tmp #Move new alias file for all users into place and activate it... cp -f /root/allusers /etc/postfix postmap /etc/postfix/allusers #Show our wonderful work... cat /root/allusers ########## Nigel Kendrick -----Original Message----- From: owner-postfix-users@postfix.org [mailto:owner-postfix-users@postfix.org] On Behalf Of suneel cumar Sent: 24 May 2005 13:25 To: postfix-users@postfix.org Subject: required help for all@domain.com hi all, i need a help in creating a domain all account called all@domain.com which indeed forwards mail to all users in domain. And i need to whitelist a address which should be for only certain domains and users who are eligible. Regards, Sunil. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ |