Monks,
Lets start with the fact that i am not a perl coder - just a bit of a newbie.
I have a variable $domain which contains data in the form of foo.com and i have a file, namely /etc/postfix/virtual which looks like this:
foo.com VIRTUALDOMAIN
@foo.com bob
user1@foo.com bob
user2@foo.com john
bar.com VIRTUALDOMAIN
@bar.com bob
user1@bar.com chris
test.com VIRTUALDOMAIN
@test.com mike
This file is used by postfix to map e-mail addresses to user accounts, and must be kept in this formatting. Say if i have a new user that is called terry and wants the e-mail address of tag@foo.com then the line 'tag@foo.com terry' must be placed directly below the entry 'user2@foo.com john'. This applies to the other domains too, like billy wants an e-mail address of bill@bar.com, so the script must seek to below 'user1@bar.com chris' and write this data there.
Thinking about it now, it would probably be easiest to seek to the '@foo.com bob', do a return and put the data in below that.
Thanks People
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.