required help for all@domain.com

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 ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-24-2005
Nigel Kendrick
 
Posts: n/a
Default required help for all@domain.com

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/

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0