Creating a 'catchall' account in Sendmail


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Creating a 'catchall' account in Sendmail
# 1  
Old 10-30-2003
Creating a 'catchall' account in Sendmail

Is there any way of creating a 'catchall' or a default account that all undelivered mail can go to ?

eg if we have 3 user accounts (user1, user2, admin) already set up, but someone sends an email to user3@mydomain.com, can sendmail figure out that it doesn't match any existing users and deliver it to admin@mydomain.com ?

Thanks,
Ash
# 2  
Old 10-30-2003
Actually, if someone sent email to user3 then sendmail should respond back to the sender that the user does not exist. You should not want all the junk mail to be delivered to another account (especially since spam mail could flood that mailbox with stuff!).

You should have postmaster@yourdomainname.xxx set up to get email that could not be ( delivered and is returned, errored due to space on receiving server, any number of errors....).

If you really want to keep all the junk that everyone may send, you could possibly put in an alias that would do it. Not recommended.
# 3  
Old 10-30-2003
Good point. It was my manager's idea ... we have a high staff turnover so there's plenty of closed accounts still getting mail from our customers.

It's to stop our customers from getting 'mailbox not found' messages and thinking the company's gone under Smilie

All the mail's gonna go to him anyway ... Smilie ... do you know how I would set up this default alias ?
# 4  
Old 10-30-2003
if they are valid accounts that you dont want to remove from the system.

put a .forward file in each of the users home dir. inside this .forward file would be 1 and only 1 email adress you want that users email to goto.
# 5  
Old 10-30-2003
My idea was simply to point the old alias at another user, from within the 'aliases' file, but my manager's decided that we must be losing out on lots of sales from people emailling different accounts. We've got everything normal set up (sales, enquiries, webmaster, nobody, manager etc etc) ...

If it's not a simple thing like adding "default" then I'll just tell him it can't be done. LOL Smilie
# 6  
Old 10-30-2003
Bug

First - update your resume.
Second - Explain to him again that the reason folks get 'mailbox not found' messages is because the person/account is no longer there. This is normal and should not be changed - the thing that SHOULD be changed is where customers send email.

Setting up email addresses such as ourIBMcustomer and pointing that to the appropriate group of folks that can answer these emails.

So one of your customers wants to send an email to a person or a group of folks at your company for information. The customer gets an email address from your company such as ourIBMcustomer@yourdomain.com. In your sendmail server (You did not post the OS - I'll give example of Solaris and Sendmail) in /etc/mail/alias file put the following entry

ourIBMcustomer: myboss, myaccount, personabouttoleave

So any mail coming in for ourIBMcustomer would go to your boss, you, and the person about to leave your company.

Then you run the newaliases command and now any email coming in for ourIBMcustomer goes to those folks. When the person does leave, you remove personabouttoleave from that line, save the alias file, and run the newaliases command again.
Now the email only goes to you and your boss (or you can add another new account). You have to teach your customers that if they want a response from email, they must send to the account set up for their company (or accounts - you can have many).

The headache is keeping up with it - hopefully you know when folks are leaving - another thing you can do is for the person who just left the company is set up an alias to send any of their email to their boss.

john.doe: jane.doe

Any email coming in for john.doe would now go to jane.doe (after the newaliases command is run).

Or a .forward file could be put into the currently gone user's home directory to forward all email to someone else. Locking the account would not effect email deliver but would be needed to insure the ex-employee did not get into your servers via that account.

If you still want to mess around with sending all email to your boss, you would have to edit the sendmail.cf file and redirect email that fails to have a valid receipent to send him the message - a wildcard alias would not work since he would get ALL email - not just invalid email.
# 7  
Old 10-30-2003
it's very easy but not recomended

You should add a line in your /etc/mail/virtusertable like this:

@yourdomain.com catchallaccount


After makemaping the virtusertable file all the mails with no owner will go to catchallaccount. It does not matter that catchallaccount is a real account or not. Anyway, the bad thing is spam mails. All the mails with fake "To:" field also will go that users mailbox. I hope, it will help...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

X11 Display Problem with Mac OSX after creating new account

For preliminaries, I am on a Mac Pro running 10.5. I am trying to run a program that opens an X11 graphic and plots a mesh. The little program is called showme. It has worked just fine in the past. Up until I had to make a new user account on this machine for myself. Now every time I try to... (8 Replies)
Discussion started by: Bocephus85
8 Replies

2. Solaris

Creating user account in Solaris

Hi I need to create a new user account in salaries. Can anyone tell me the cmd to create the new user acc. But the main thing is it should same permissions ,same group etc of already existing group. For example we have already one user in name “comp” so the newly created user should also have... (3 Replies)
Discussion started by: kkalyan
3 Replies

3. UNIX for Dummies Questions & Answers

Creating FTP account using SSH (putty)?

Hello, : ) I have a remote access to the server that hosts my joomla, and it does not have cpanel. So I have to do everything manually. I need to have an FTP account to the httpdocs folder because I need to put these info in the config file of joomla (to allow file uploading ...etc) So,... (8 Replies)
Discussion started by: Hayatt
8 Replies

4. Solaris

Creating User account with limited permission

Hi All, I want to create an user account which can only excute "df -kh" and "prstat -a" command. The user will not be able to perform "rm" and other critical commands. Is there a way to do it? rgds, Ronny (2 Replies)
Discussion started by: ronny_nch
2 Replies

5. Programming

Creating email account prgramatically + java ?

Dear Friend, I am working on java application which requires that after successful registration an email account is created (say username@mydomain.com) for user. Is is possible to create e-mail account programatically ? Enviornment - CentOs, Tomcat Web server. CPanel is available, but... (0 Replies)
Discussion started by: reckless_jack
0 Replies

6. UNIX for Dummies Questions & Answers

Creating a new account

Hi How do I create a new account with a specific group and home directory specified? TIA (2 Replies)
Discussion started by: domburf69
2 Replies

7. UNIX for Dummies Questions & Answers

creating a new unix user account

:) Hi guis, I would like to Know how to create a new user account with examples. I refered some books ,but they r not clear. Can any body of u provide me a shell script to create a new user account. any help pls :) cheers Ravi Raj Kumar (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

8. UNIX for Dummies Questions & Answers

creating admin account

does any know how I can create more admin login accounts in unix? would there be a file somewhere that would have a list of these accounts? thanks, gammaman (3 Replies)
Discussion started by: gammaman
3 Replies

9. Post Here to Contact Site Administrators and Moderators

Error creating new account

I tried to create an account, user name Ralph.Armstrong using my corporate e-mail address. Unfortunately, I think my company's e-mail server must have blocked the confirming e-mail because I never got it. I then created another account, user name Ralph Armstrong using my personnal e-mail... (0 Replies)
Discussion started by: Ralph Armstrong
0 Replies

10. UNIX for Dummies Questions & Answers

Creating a manager account

Dear All, This is my first post, so greetings to you all! :cool: I have root access to a UNIX system, yet I would like to be able to create user accounts with special privileges and roles such i.e. a User Manager account a Print Manager Account or even an account with the same roles and... (2 Replies)
Discussion started by: neked
2 Replies
Login or Register to Ask a Question