Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a mail server whose domain name is "vrk.com" and a user named "vinod" in it...

All the mails send to "vinod@vrk.com" comes into the mail box /home/vinod/mbox

Can i store mails addressed to "blahblah@yahoo.com" in this same mail box i.e /home/vinod/mbox...or into another catch all kind of user which catches all the mails regardless of the domain???? is it possible...i am using Postfix....

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can't capture emails addressed to yahoo.com since Yahoo's MX records don't point to your server, so they'll never get routed through your postfix service.

If you're trying to create a catchall for a specific domain what you'll need to do is create a Virtual Domain file for postfix

sudoedit /etc/postfix/virtual

In the virtual file add the following:

@vrk.com vinod

Replace @vrk.com with the name of the domain you want to create the catch-all with (in your question this is where yahoo.com goes - however, as mentioned prior, you can't actually use yahoo.com as a valid domain since Yahoo's mail doesn't route to you) and the vinod part should be replaced with the email username that the catch-all should go to.

Once you've created this file you'll need to encode it. That is done simply with the following:

postmap /etc/postfix/virtual

This does all the jazz (encoding, validating, etc) that Postfix needs in order to read it. To finish things up you'll want to add some lines to the configuration file and restart postfix

Open the configuration file with sudoedit /etc/postfix/main.cf and add this line to the bottom

virtual_alias_maps = hash:/etc/postfix/virtual

Then the restart with sudo service postfix restart!

share|improve this answer
    
he opened a separate question for which this is the correct and complete answer. you might want to repost it [here][1] [1]: askubuntu.com/questions/24883/… –  hbdgaf Feb 5 '11 at 4:36
    
In my case the mail server is local...not connected to internet...so yahoo.com would be just like any-other domain...right??....so it should work... –  Vinod K Feb 5 '11 at 4:41
    
.its working....All the mails...from domains added in virtual file...like this "@yahoo.com root"....arrives....but not inn root mailbox but in nobodys mailbox....any idea why????..can i change it to make it come in root mail box??? or shall i create another user in the mail server and give it that mail box name?????...i think i did that with my mail box name i.e vinod....but only security mails were coming... –  Vinod K Feb 5 '11 at 5:06

If you want to consolidate email from various POP3 accessible servers you can use the fetchmail package to fetch the email and deliver it to your server. For freemail services like yahoo you will likely need to enable POP for the address you wish to fetch. Documentation on configuring fetchmail will likely be in /usr/share/doc/fetchmail or by web at 'http://localhost/doc/fetchmail`.

share|improve this answer
    
I think this more directly addresses what the user is trying to accomplish, although Marco's statements are correct. –  hbdgaf Feb 5 '11 at 3:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.