102answergirl.qxd 23.10.2000 16:04 Uhr Seite 102

BEGINNERS TROUBLESHOOTING

The Tutor POSTING THE

MAILPATRICIA JUNG

Computers can often give you a surprise, even under . Often things don’t work as they are actually meant to. The Tutor shows you how to deal with these little problems.

It’s unusual in the Windows world for a home or grounds (services which are not made available workstation PC to be equipped with its own mail by your own computer can’t be abused or , but in Linux installations the SMTP server attacked by net baddies) or to conserve (also known as MTA – ”Mail Transfer Agent”) is part resources, why not use your local SMTP server of the basic system, for good reason. Without it, when sending mail, and be independent of your programs like Cron Daemon, which controls the access provider? automatic processing of specified tasks at pre- defined times, have a bit of a problem, as they like It doesn’t have to be sending both failure and success messages by mail to the local user concerned. Many distributions have the grandfather of MTAs Even if, as a home user, you switch off as Sendmail pre-installed. This program is very powerful many servers as possible on safety but has one major drawback: its configuration file, /etc/sendmail.cf, is written in such a way that wile it is easy for machines to understand it is more or less SMTP: ”Simple Mail Transfer Protocol” is a convention for how is incomprehensible to humans. transported through the Internet. In the versions of sendmail now commonly used it is possible to create an easily Daemon: A class of program (the name comes from ”disk and execution understandable sendmail.mc file and transcribe monitor”) that is started at boot-up and runs in the background performing this using the m4 pre-processor into a suitable some essential service for the system. sendmail.cf. But in all honesty, do you trust yourself to configure a program correctly and Cron: The time daemon (cron or crond, depending on the distribution) deals with satisfactorily, whose version number you can’t tasks specified in Crontabs (”Cron tables”) at the time specified therein. find usingsendmail -v or sendmail –version, but only by means of /usr/sbin/sendmail -d0 -bt < /dev/null ?

102 LINUX MAGAZINE 3 · 2000 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 103

TROUBLESHOOTING BEGINNERS

Many problems with Sendmail arise only because even fairly proficient users don’t have the Symbolic link: A reference to another file created using the command ln -s. By energy to plough through several hundred pages of this means a file can be addressed by different names. documentation. The upshot of this has been that setting up your own mail server is generally Dependencies: Classic Unix programs require that they can dispose of the considered to be a task achievable by only the most they create using a local mail server: they depend on it in such a way wizened of gurus. that their presence on a computer without an MTA would be pointless. Each rpm or deb package contains information about this dependency so that the Alternatives package manager will warn you if you try to install a program that requires an MTA when one is not present, or if you try to uninstall an MTA when It doesn’t have to be like that, though. Such user- other programs are installed that depend on it. It will also prevent you from hostility has even bothered the gurus, providing installing different MTAs side by side, because some of the settings needed them with just the excuse they needed to go off and will clash. write their own mail server. So now there are a wide variety of Sendmail alternatives ranging from the POP: The ”” provides a way to receive mail even when not ”little” smail via , , Zmailer (which was constantly online to your ISP’s SMTP server. The POP server plays post-box and specially optimised for heavily-used mailservers) to allows the user to pick up mails collected (by SMTP) at a later time using a , which really does take some getting used to. suitable tool (for example, ) or a POP-compatible mail program. All are usable to some extent by applications designed to work with Sendmail. So for reasons of compatibility there is always a symbolic link named /usr/sbin/sendmail. Thanks to -v (”verbose”) we learn that Sendmail For the home user, optimal behaviour of the and Postfix are mutually incompatible. MTA under a heavy load – a key criterion for All right, we’ll solve the problem by uninstalling (-e internet service providers, universities or big as ”erase”) the sendmail package … companies – doesn’t matter. The most important [root<\@>pc software]# rpm -e sendmail thing in this situation is good documentation and error: removing these packages would break dU comparatively simple installation and configuration. ependencies: All three criteria together are satisfied best, in my smtpdaemon is needed by fetchmail-5.3.1-1 experience, by Postfix (http://www.informatik.uni- smtpdaemon is needed by -1.0.1i-6 bonn.de/pub/software/postfix/start.html). smtpdaemon is needed by nmh-1.0.3-6x

Escaping from Sendmail … or maybe not: The installed mail programs mutt and nmh and the POP fetchmail absolutely Postfix has the additional advantage that it comes will not relinquish their SMTP server. Without this, with many distributions as an rpm or deb archive, or their functionality would be affected, and as rpm is at least available as such. users won’t doesn’t know that we are immediately going to actually find the package in the core distribution, provide them with a new replacement mail server, it but in powertools (e.g. at ftp://ftp.redhat.com/pub/ gets awkward. redhat/powertools/6.2/i386/i386/). Who is the boss here? The rpm man page, Since a whole range of programs can only be despite all its complexity, is really helpful in this installed using a package manager if the latter is situation. It reveals that by using the option aware of the existence of an MTA, it is essential in –nodeps (”no dependencies”) the package order to avoid later problems to install the SMTP manager can be made to understand that it should server using the package manager, too. Otherwise simply overlook dependencies. rpm or dpkg are almost unbeatable for But it’s better to be safe than sorry: After stubbornness. installing Postfix, is everything now in order for our This is exactly the problem we have to combat sendmail-loving mail assistants? Let’s just ask when we want to use something instead of (”query”: -q) the Postfix rpm package (-p as Sendmail. In the first instance, simple installation (-i) ”package”), to see what it actually makes available of the Postfix package as root doesn’t work: (–provides).

[root<\@>pc software]# rpm -ivh [trish<\@>pc software]$ rpm -qp —provides postfix-19991231_pl02-4.i386.rpm postfix-19991231_pl02-4.i386.rpm error: failed dependencies: MTA sendmail conflicts with postfix-19991U smtpd 231_pl02-4 smtpdaemon

The option -h (as in ”hash”, meaning to use # The answer tells us we can take the momentous step symbols as a progress indicator) shows that nothing of uninstalling Sendmail with an untroubled mind: has happened because rpm flatly refuses to load a The smtpdaemon that mutt, fetchmail and nmh all package whose dependencies are not fulfilled. need will be restored by the Postfix installation.

3 · 2000 LINUX MAGAZINE 103 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 104

BEGINNERS TROUBLESHOOTING

So we can now try again to remove sendmail: Postfix is a daemon, and like all such programs there is a start-stop file for it in the directory init.d [root<\@>pc software]# rpm -e —nodeps sendmail [root<\@>pc software]# rpm -ivh postfix-1999U (”Initialisation of Daemons”), which, depending on 1231_pl02-4.i386.rpm the distribution, can be found under /etc, /etc/rc.d, postfix /sbin etc. (Exotic distributions like Slackware, which ###########################################U don’t use this logical System-V Init concept, are ####### something we will avoid discussing at this point.) postfix-script: warning: creating missing PoU stfix pid directory If you change (using cd) into this directory, all postfix-script: warning: creating missing PoU you need is the command ./postfix start (note the stfix incoming directory dot slash, ”./” in the path) before trying telnet [...] localhost smtp once again: postfix-script: warning: creating missing PoU stfix private directory Trying 127.0.0.1... Connected to localhost. rpm is no longer carping that we are destroying Escape character is ‘^]’. package dependencies by deleting sendmail (-e), 220 computername ESMTP Postfix and with it uninstalled we also see a bit of the progress indicator (-h). Because verbosity is switched on (-v) we learn from rpm that when loading in the If I were a mail program postfix packages a couple of directories which were not previously available (”directories”) named pid, Anyone who would now like to know how mail incoming etc. have now been set up. programs (alias ”Mail User Agents” – MUA) and SMTP servers converse, should enter the command So long as it stays at home... help now. Postfix reacts with a curt: 502 Error: command not implemented Even if you are not quite confident enough to use this server to send messages into the big, wide Shame, we ought to have done that first when we still world, at least local users can now send emails to had access to Sendmail. Then, it would have provided each other. Is it really that simple? Using: some fine assistance on how to converse with it:

[trish<\@>pc software]$ telnet localhost smtp help telnet: Unable to connect to remote host: CoU 214-This is Sendmail version 8.9.3 nnection refused 214-Topics: 214- HELO EHLO MAIL RCPT DATA we check whether there is actually a mail server 214- RSET NOOP QUIT HELP VRFY lurking on the SMTP port of our local computer 214- EXPN VERB ETRN DSN 214-For more info use ”HELP ”. (”localhost”). Connection refused – bad luck! No 214-To report bugs in the implementation senU answer from the mail server and thus no chance, d email to either, of sending even the tiniest bit of mail. 214- sendmail-bugs<\@>sendmail.org. Before you start turning the air blue, though, 214-For local information send email to PostU you should bear in mind that the requirements for master at your site. 214 End of HELP info mail servers are so diverse that most administrators would certainly start cursing if suddenly, after Could the clarification of the individual SMTP installation, a mail server were immediately to run, commands be a bit more detailed? Certainly: and in the worst case do everything but what it was help MAIL supposed to. Wrongly configured mail systems can 214-MAIL FROM: [ ] cause an awful lot of trouble. However, if you are 214- Specifies the sender. Parameters arU certain, on your single-user computer, that no-one e ESMTP extensions. but you will be sending mail, you can risk testing 214- See "HELP DSN" for details. the default configuration at least just for local mail. 214 End of HELP info

./: Executable files that live in directories which are not in the search path must be selected using the full path. Unlike DOS, under Linux the current directory (which can be referenced as ”.”) is not made part of the search path. If the program you want to run is in the current directory, you must specify dot and forward slash to create a full path. The command echo $PATH prints out the search path.

CR/LF: The good old ASCII symbol carriage return (named after the key of the same name on typewriters) (”Carriage Return”) and line feed (”Line Feed”) under DOS and derivatives are both generated at the same time by pressing the Enter key. In this context, however, the instruction simply means that you should press Return. Under Unix a hard line break is just LF (under MacOS just CR), which certain Windows editors (and some printers) take very badly. It is therefore important even for plain text files to use the correct coding of the line break and if necessary to use tools like dos2unix and unix2dos to perform conversion.

104 LINUX MAGAZINE 3 · 2000 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 105

TROUBLESHOOTING BEGINNERS

So MAIL is the command to specify the sender and Household remedy RCPT… Before we go wandering off completely into the forest help RCPT 214-RCPT TO: [ ] of configuration options required by most MUAs we 214- Specifies the recipient. Can be useU still have the Unix classic mail. Anyone who has ever d any number of times. had anything to do with this program will probably 214- Parameters are ESMTP extensions. SeeU agree that thanks to its somewhat cryptic user "HELP DSN" for details. interface it is no use as an everyday mail program. But 214 End of HELP info for our diagnostic purposes it will do splendidly. … specifies the recipient. But instead of these friendly explanations provided by Sendmail, Postfix is silent at this point. Its Ruthless uninstallation with ’s apt-get or dpkg author, Wietse Venema, made the quite reasonable assumption that anyone who was so The Debian package manager also carps when you want to remove inclined as to try to talk to a mail server using a packages that it considers vitally necessary using -r or –remove: terminal program would already know the lillegroenn:/home/trish/docs# dpkg -r sendmail language to use, while the MUAs that would be dpkg: dependency problems prevent removal of sendmail: communicating with it most of the time would mutt depends on mail-transport-agent; however: have no use for online help. Package mail-transport-agent is not installed. We can try sending a message using the Package sendmail which provides mail-transport-agent is to be removed. terminal program to test the system, which will also [...] anacron depends on exim | mail-transport-agent; however: serve as an instructive demonstration of how SMTP Package exim is not installed. works. The conversation goes: Package mail-transport-agent is not installed. Package sendmail which provides mail-transport-agent is to be removed. MAIL From: yourusername<\@>your.mailaddress [...] 250 Ok dpkg: error processing sendmail (—remove): dependency problems - not removing This specifies the sender of the mail (you should, of Errors were encountered while processing: course, put your real name and address in here) and: sendmail RCPT To: yourusername 250 Ok But thanks to the –force option, this too can be overcome. To find out all the possible options try: dpkg –force-help. For example: specifies the recipient, the user you are logged in as. depends [!] Turn all dependency problems into warnings After: Turn all dependency problems into simple warnings? In this case that DATA 354 End data with <\<>CR><\<>LF>.<\<>CR><\<>LF> appears to be right up our street. But anyone who is a bit anxious about the effect of dpkg -r –force-depends sendmail can first try a dry run (–no- you type in the rest of the mail text… act) to see what happens:

testmail lillegroenn:/home/trish/docs# dpkg —no-act -r —force-depends .. sendmail

…, which you terminate using a single dot on a line After the long list of warnings, dpkg then tells us with … all on its own – just as specified by the help prompt: Would remove or purge ... 354 End the data with Enter-Dot-Enter. … that it is – no matter how reluctantly – clearing us a space for the 250 Ok: queued as BD7F34EC9 Postfixinstallation with dpkg -i postfix_0.0.19991231pl05-2_i386.deb or This means the mail is ready to be delivered. We can apt-get install postfix. now say goodbye using: Obviously apt-get can also be used to remove sendmail:

quit lillegroenn:/home/trish# apt-get —no-act remove sendmail Reading Package Lists... Done Building Dependency Tree... Done Has the mail reached you (or rather yourusername)? The following packages will be REMOVED: To find out, it is important that your e-mail program anacron mailx mutt sendmail uses the file /var/spool/mail/yourusername as the 0 packages upgraded, 0 newly installed, 4 to remove and 16 not upgraded. Mail folder. This is where all mails to yourusername Remv anacron received via SMTP are usually stored. With Remv mailx traditional Unix mail programs like mutt or pine you Remv mutt should have no problem with this. Netscape and Remv sendmail other graphical MUAs on the other hand are not always so easy to persuade to look for mail in the As you can see, this resolves the dependency problem in its own way: it removes spool directory and if necessary also to leave all the packages which would be in the way of a clean uninstallation in one go. messages there.

3 · 2000 LINUX MAGAZINE 105 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 106

BEGINNERS TROUBLESHOOTING

without a colon, which was produced by the DNS: The ”Domain Name System” is, in effect, a database spread over a great mail server. many machines called name servers, that allow you to address computers using All very exciting. Maybe all that’s of interest now meaningful textual addresses (”www.linux-magazine.co.uk” for example) is how to delete this mail No. 1. The command is instead of user-unfriendly IP addresses such as 195.143.20.22. The names consist (”delete”)… of the computer name (”www”), subdomain(s) (”linux-magazine”) and top-level & d1 domains (”co.uk”). The DNS database also keeps records of which mail server accepts mail for a specific domain (e.g. for anyone at linux-magazine.co.uk). …which then shows all the other mails … FQDN: The ”Fully Qualified Domain Name” of a computer consists of the computer name (e.g. www) and the complete domain (linux-magazine.co.uk). & h No applicable messages

Header: Electronic mail always consists of two parts: the housekeeping Having read the only mail, we can use the information like sender and recipient address, the subject (Subject), the type of command ”quit” to end the program: document (MIME type) etc., and the actual message, the body. Many mail & q programs hide most of the header from users. Most Unix mail clients, though, store mails in their original plain ASCII text form (even images and other non-text Of course, mail can also be used for writing a test mail: file attachments are converted for the purposes of transport into pure ASCII [trish<\@>pc software]$ mail -v ihrusername symbols and have to be converted back by the mail program afterwards into their Subject: test original format.) This means that using a simple less /var/spool/mail/username (or testmail 2 similar) you can look at the whole inbox and see the headers in all their glory. .. Cc: [ Press Enter ] Spam: The popular name for Unsolicited Bulk Email, which everyone who has used the Internet for any length of time will certainly have received, and … and thanks to the verbosity parameter -v (”verbose”) wished they hadn’t. mail now shows us how the mail is delivered to Postfix:

send-mail: open maildrop/56CAC13ABD grep: A standard Unix command line tool for locating character strings. If you push the output of a command (in this case from rpm -ql postfix) through the ”pipe” | into grep, it searches this output for the specified string (in this case main.cf). On the margin of legality?

It would be nice if that was all. But when it comes to answering our test mail, its sender address (in the [trish<\@>pc software]$ mail example [email protected]) is anything but Mail version 8.1 6/6/93. Type ? for help. usable. If it arrived like this at another computer it "/var/spool/mail/trish": 1 message 1 new would even be illegal, because it doesn’t exist. This >N 1 trish<\@>regtest.enitel.net Wed AU ug 23 20:09 12/371 is just the start of our configuration problems. & Private individuals rarely have the details of their personal computer entered into the DNS. So there At the mail prompt, which in this instance looks like is no way at installation that Postfix can find out for & just for a change, you can obtain help using a itself for itself the Fully Qualified Domain Name question mark. Or you can simply type in 1 to read (FQDN) of the machine to which replies should be mail number 1: addressed. Each mail must be labelled in such a way that the address to which an answer can be sent is & 1 Message 1: shown too. At this point things look bleak for >From trish<\@>regtest.enitel.net Wed Aug 2U computers which are not in the DNS. 3 20:09:09 2000 In good mail programs a Reply-To: header can From: Patricia Jung <\<>trish<\@>regtest.eU be defined, which informs the recipient MUA of the nitel.net> address to which it should reply. Poor mail programs, To: trish<\@>regtest.enitel.net Date: Wed, 23 Aug 2000 20:08:46 +0200 though, often don’t take this into account. Besides this, we still have no valid sender address and thus testmail are violating Internet standards. Therefore most good mail programs allow the From: sender header & to be set by the user to a valid mail address. That would be enough if we simply sent mail Recognise your test mail? The From: line exactly only to the Smart host SMTP server of our Internet matches what you typed after the MAIL access provider. But the whole point is that we don’t command, while the To: line on the other hand is want to be dependent on them, and that’s where we what came after RCPT, supplemented if stumble over another problem. Although we may be necessary by the computer name. Then there is able to specify what to put in the Reply-To: and the the date stamp, which the MTA has generated. From: headers, the receiving mail server generates, But wait: there is in fact a second From, this time as we have seen with our test mail, a so-called

106 LINUX MAGAZINE 3 · 2000 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 107

TROUBLESHOOTING BEGINNERS

Envelope address. The content of this From line (the mail to many mail servers. Some send the error message one without a colon) is checked by some mail servers intended to inform us that the mail was refused to the to see if it really exists, since spam usually appears to address which doesn’t really exist, so that we never originate from an address which cannot be looked receive it. When addressees repeatedly, obstinately insist up in the DNS and this is one way of rejecting it. that they haven’t received mails, while the sender With an unresolvable address we have got ourselves cannot remember any messages being returned as a great deal of trouble. It isn’t just that we can’t deliver undeliverable, this is often what has happened.

Now just configure — the main parameters from main.cf

Fortunately almost all the parameters in Postfix’s main configuration file are set to sensible default values. Also, they are mostly documented very thoroughly. Nevertheless you ought to run through the configuration to at least try to understand it and modify it if necessary before starting the server.

As usual, in this file a # serves as a comment symbol, which prevents Postfix from treating the rest of the line as an instruction. A $ with a variable name after it means that Postfix replaces this combined symbol by the value stored in the variable.

• If you are using an rpm or deb package made for your distribution, the various directories (queue_directory for the mail queue and command_directory for the Postfix help or daemon_directory for the necessary servers) are set to the right values. If something doesn’t work, check if these directories are present and the last two are filled with the appropriate programs. If, however, you note settings which are clearly wrong at this point, and which are not the result of changes you have made, save yourself what may be a great deal of aggravation by trying a new installation using a new package. • mail_owner, the owner of the mail queue and most Postfix processes should never, ever be attributed to root. Instead, use a special user (such as the very boring postfix). Look in /etc/passwd to check that this user is also there. If not, you must create it and if necessary give it access rights to the Mail spool and the various Postfix programs. • For many processes Postfix needs no specific special rights (as possessed by mail_owner or even root), nor should it have them. Therefore default_privs should be attributed to a user with the lowest possible level of rights such as the user nobody which is preconfigured on most systems. • When myhostname contains the FQDN of the computer you no longer need to worry about mydomain (which by default contains only the domain component of myhostname) and myorigin (normally the same as myhostname). You can find out the standard value using the command hostname –fqdn. If this value doesn’t match your default settings, change the variables. And when you do, don’t forget to remove the comment symbol. • You may have noticed that every mail includes a header named Message-ID:. This marking consists of a unique sequence of symbols generated by your mail server, an @ and the value of myorigin. This ID is supposed to be unique for that message. But since mailservers know nothing about any ID strings that may have been generated by others, myorigin should also be unique to your computer, so that no duplicates occur. For this reason, don’t make myorigin equal to the domain name of your provider or to localhost. • If you only use your mail server for sending mail out and for local mail, but not for receiving mail from the Net, you should restrict inet_interfaces to $myhostname, localhost. • The last stop (mydestination) for incoming mail is your mail server for mails which may be addressed to localhost, $myhostname. • In the file aliases you can define who receives the post which goes to specified local users. It’s important that you attribute mail addressed to root to a user who actually reads mail and is responsible for the system (e.g. yourself). A reasonable default value is:

alias_maps = hash:/etc/postfix/aliases

You should then modify /etc/postfix/aliases so that the line with root: on the left side has on the right, next to it, either your local username or one of your valid mail addresses. Example (for modification, not to be mindlessly copied!):

root: pjung<\@>linux-user.de

If you have gone to a lot of trouble with your old /etc/aliases stemming from the days of sendmail you can of course reuse this in alias_maps. But don’t forget to convert the file using the postalias command into the required hash format.

Traditionally /var/spool/mail has been the mail_spool_directory under Linux. With home_mailbox, though, you can also keep local mail in a file in each user’s home directory. This is sensible if they are using programs such as Netscape or Kmail. You can also accommodate people who, instead of a folder-file, like to store each mail as an individual file with home_mailbox. Do experiment a bit here by sending mails to a local test user (and please note that Postfix has to be restarted after each alteration to its configuration.)

3 · 2000 LINUX MAGAZINE 107 102answergirl.qxd 23.10.2000 16:04 Uhr Seite 108

BEGINNERS TROUBLESHOOTING

Address manipulation This means that the local user trish becomes the sender pjung<\@>linux-user.de with a valid mail address. So with a heavy heart, we pick up the Postfix Now all we have to do is set the variable documentation. The keystone of the configuration sender_canonical_maps in main.cf to the name of is the file main.cf, usually found in /etc/postfix. But our table file: the package manager also provides information sender_canonical_maps = hash:/etc/postfix/seU using rpm -ql postfix | grep main.cf or dpkg -S nder_canonical main.cf. (The rpm-options can be queried with -q for ”query” – and -l for ”list( of all files contained in the package)”; the -S in the Debian package How do I tell my mail server? manager stands – even more simply – for ”Search”.) It’s worth taking a closer look at the basic Now we have everything we need, and thanks to configuration described at the command /usr/sbin/postfix reload we don’t even http://totem.fix.no/postfix/basic.html (especially if need to restart Postfix with ./postfix restart in the the attempt at sending a test mail failed: see also init.d-directory. A new local test mail is written … the box ”Now just configure – the main parameters but what arrives still has the wrong header (i.e. the from main.cf”). We are mainly interested in the item ”old” address from the left side): Address Manipulation >From [email protected] Wed Aug 2U (http://totem.fix.no/postfix/rewrite.html) in this 3 21:19:06 2000 documentation. The title suggests something mildly [...] illegal, and yet this is the only way for those of us From: [email protected] (Patricia U without a fixed IP address and DNS registration to Jung) operate our own mail server. The item ADDRESS REWRITING in main.cf What did we do wrong? sounds like exactly what we want: Rewriting or When the number of users of a mail server is large, masking sender addresses. A quick look into the it takes far too long to read in a very long text file. sample configuration file provided, sample- Postfix may therefore use several formats for canonical.cf (in the Postfix documentation directory conversion tables such as /usr/doc/postfix-19991216 or similar) confirms that /etc/postfix/sender_canonical. Which method is we have found the right tool: used can be found, according to the FAQ (http://www.postfix.cs.uu.nl/faq.html#intranet) # The parameter sender_canonical_maps specifU ies optional tables, using the command: U # which can be referred to in order to find o [root@pc software]# /usr/sbin/postconf -m ut which Envelope- and nis U # Header-Address a specified sender should r regexp eceive. environ # btree U # You will need this e.g., if you want to con unix vert the sender address hash # [email protected] into [email protected] main, where it should still With the prefix hash: in sender_canonical_maps we U # be possible to send mail to the receiver ad had specified that the hash format must be used. dress [email protected]. This means that we wanted Postfix to use not a Our keyword here is Envelope- and Header- slow text file but a special binary format. Address. The first means the topmost From line But we haven’t created one. To create the with no colon in the header of a mail, with ”Map” from the text file (the meaning of the -m in ”Header-Address” the From: line. So we create, the postconf command) there is a special command following the example in the documentation, a called /usr/sbin/postmap, to which we give as an text file named /etc/postfix/sender_canonical. In argument our sender_canonical text file: this file the mail address is on the left, as it is [root@pc software]# /usr/sbin/postmap automatically created when a user sends a mail, /etc/postfix/sender_canonical and on the right, how the appropriate valid address should be worded. You can find the left A ls -al /etc/postfix now reveals that in this directory hand side from your test mail. This consists of the a new file named sender_canonical.db has been user name on the system (i.e. the name with generated. After that – and we’ve worked hard for which the user concerned logs on), the @ symbol, this – everything falls into place with the test mail: and the value of the configuration variable >From pjung<\@>linux-user.de Wed Aug 23 22:U myorigin from main.cf (see box). 04:02 2000 An example: [...] From: [email protected] (Patricia Jung) trish<\@>regtest.enitel.net pjung@linux-uU ser.de And that’s it!

108 LINUX MAGAZINE 3 · 2000