What about the case where two virtual users want to be info@mydomain.com and info@over.here.com? Or joe or john or blah???

In this case you (possibly) need a single info, joe, john, etc account on the box (so it will accept the mail) but you need to modify the virtuser table for sendmail (if that is what you are using) to redirect the info@... mail to the correct users. Note procmail will not work as the mail headers on the envelope are stripped by the time procmail gets to see a given message.

FYI there are many ways to configure sendmail to accept and redirect mail. Maybe you should RTFM as you are definitely not the first person to strike this problem, and there are several ways to skin this particular cat. As suggested by Zaxo while your solution will work it is not highly recommended. Procmail is also a useful widget in a number of circumstances. For example you can direct all mail for *@domain.com to a single shell account, have procmail intercept it and redistribute it to any number of email accounts - either local or remote. Voila - infinite virtual POP boxes without infinite shell accounts.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Re: useradd with perl and cron by tachyon
in thread useradd with perl and cron by true

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.