On Tue, Oct 02, 2007 at 08:57:52PM -0700, Gregory K. Ruiz-Ade wrote: > On Oct 2, 2007, at 5:18 PM, Stewart C. Strait wrote: ... > >2. I am trying to send mail (using mutt and postfix) from my local > >[EMAIL PROTECTED] account via roadrunner to the outside world. This > >almost works. My From: (and probably From_) headers say scs instead > >of sstrait1. This was what I was trying to correct with > >/etc/postfix/generic. > > This should be changed in mutt itself. Trying to change it with the > postfix MTA is like using a hammer to swat a fly. It'll work, but > you have to be really accurate. Others versed in mutt (I do not use > it) should be able to jump in here to help you with this.
After a lot of research (with some help from others) about 6 years ago I discovered that mutt would not let me set the From_ header. I decided that researching this again should be a last resort. Note that it isn't an easy enough question that anyone answered in a few days. I want to emphasize that Gregory's advice helped far more than this email might suggest. In particular, I might never have found that /etc/mailname had been set up wrong by my dialogue (mistakes?) with the Ubuntu installation software. The combination of weird symptoms and his assurances that the fix should be easy suggested that I do a search outside the postfix files. Grepping through all of /etc for my ISP's domain name (san.rr.com) did the trick. ... > My solution is to alias root to my ISP address, and configure the > local postfix to use my ISP's SMTP server as relayhost. > > The other solution is to alias root to your machine-local account > (the one to which fetchmail is delivering your messages via postfix), > i.e.: > Ubuntu set something like this automatically. ... > Basically, your postfix main.cf can be as simple as: > > myhostname = workstation.$mydomain > mydomain = localdomain > mydestination = $myhostname, localhost, localhost.localdomain > relayhost = your.isp.smtp.server.com ... > Your local username shouldn't matter. I can send mail with: > > echo "test" | mail -s "test" [EMAIL PROTECTED] > > from my linux box, and postfix will happily hand it off to Cox's SMTP > server, which I have configured as $relayhost for postfix. > Everything works happily. If everything else cooperates ... I ended up duplicating the ideas I used with sendmail 6 years ago. > Really, as above, both of these issues should be addressed by > properly configuring mutt. In fact, you could just configure mutt to > use your ISP's SMTP server directly, and avoid most, if not all, of > the "sending mail" hassle. It's really what I would recommend. Perhaps mutt includes a sort of minimal MTA so it can use my ISP's SMTP server (and pop server) directly. In the old days Pine did this but mutt didn't. Everything seems to work now. The most mysterious problems were because /etc/mailname, which I had never heard of,was wrong. In my case it is one line: san.rr.com # wrong localhost.localdomain # right If I understand correctly, postfix appends this domain to addresses that have no domain. This explains mail from just scs changing to be from (the fortunately nonexistent) [EMAIL PROTECTED] . With this file wrong, I could limp along only if my mydestination line had a matching error, and only by tolerating scary header errors. I suspect that if I left this alone, I could never email any other san.rr.com (Roadrunner) customers. In simple cases (single-drop) like mine, fetching mail with pop3 and fetchmail needs essentially the same postfix configuration as local mail. It is an exception to the rules for mydestination. Your ISP's domain name need not and probably should not be in mydestination, if I understand correctly. Luckily I found this on the net and in the first hundred lines from man fetchmail . I also needed to change /etc/postfix/main.cf , but somewhat as expected: mydestination = san.rr.com, \ localhost.localdomain, localhost.localdomain, localhost # wrong mydestination = \ localhost.localdomain, localhost.localdomain, localhost # right (The backslashes, following line breaks," # wrong", and " # right" are not in the actual files.) I inserted: smtp_generic_maps = hash:/etc/postfix/generic I had previously corrected a line to read: relayhost = smtp-server.socal.rr.com I had previously created the one-line file /etc/postfix/generic: [EMAIL PROTECTED] [EMAIL PROTECTED] and compiled it to obtain /etc/postfix/generic.db . You can almost dodge the generic logic, but only at the cost of confusing your local domain with your ISP's domain. Thanks Stewart Strait -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
