Re: Postfix troubles (rewriting addresses)
Joachim Trinkwitz, 2001-Nov-10 20:15 +0100: > Dear all, > > to rewrite my mail address correctly (ppp connection to university > ISP), I inserted the following lines in the config files: > > - /etc/postfix/main.cf:relayhost = mailout.uni-bonn.de >myhostname = wabe.germanistik.uni-bonn.de >masquerade_domains = uni-bonn.de > - /etc/postfix/canonical:joachim [EMAIL PROTECTED] > - /etc/postfix/sender_canonical:joachim [EMAIL PROTECTED] > > This works for my part, but there is a problem when I send a mail to > someone with an address like [EMAIL PROTECTED]': the address is > delivered correctly, but the `To:' address in the header too is > rewritten to [EMAIL PROTECTED]' (without the `xyz'). This wouldn't be > a real problem, but I'm driving people crazy who've got a mail with > such an address in the `CC' field and wants to do a `Reply to all' ... > > Hoping someone can give me a clue, > joachim It looks like postfix is setting the deliverto: header with the correct desitination but changing the To: header to your masquaraded domain. By masquarading, postfix will strip any subdomain structures, so you probably shouldn't be using this feature. jc -- Jeff CoppockSystems Engineer Diggin' Debian Admin and User
Re: Postfix troubles
I've worked around a similar problem with postfix recently. The solution turned out to be very simple, using Postfix's `virtual host' facility. You basically insert into your /etc/postfix/main.cf file the contents of /usr/share/doc/postfix/examples/sample-virtual.cf; the critical line is: virtual_maps = hash:/etc/postfix/virtual You then create a /etc/postfix/virtual file; here's mine (`catnip.gol.com' and `tc-1-100.kawasaki.gol.ne.jp' are the two hostnames my system has had in in /etc/hostname; neither is actually a valid hostname since my ISP uses dynamic IP): @catnip.gol.com @localhost @tc-1-100.kawasaki.gol.ne.jp @localhost [and then tell postfix about the file with `postmap /etc/postfix/virtual'] If you send mail to just `root', postfix will attach the local hostname (from /etc/hostname), but then the virtual host map will change this to be just [EMAIL PROTECTED]', which postfix will correctly deliver to the local machine. -Miles
Re: More questions about Postfix (Was Re: Postfix troubles)
On Thu, Jun 29, 2000 at 10:10:56PM -0400, S.Salman Ahmed wrote: > and now mail to root/[EMAIL PROTECTED] is correctly forwarded to me. Thanks > for the suggestion. I am surprised this wasn't in the Postfix FAQ. I've got suspicion that mydomain was set to "phoenix". > Another thing I noticed in my logs is the following postfix-related > message: > Jun 29 21:52:57 phoenix postfix/local[2536]: warning: biff_notify: Connection > refused > What is biff_notify() and how can I disable this so that this message > doesn't fill up my logs ? It's one of the mechanisms used for "you've got mail" notifications. IIRC there's a "biff" option you can set to stop Postfix trying to do this kind of notification, but I could be wrong. > Lastly, is there anything else that can/should be done to secure Postfix > on a dialup system ? I have already closed my system to any outside > access using tcp_wrappers. Should I be concerned with any smtp-relaying > issues since Postfix is running on my system ? Postfix is pretty secure by default. You could always firewall out any incoming connections on port 25, but if you don't want to worry about firewalling I wouldn't worry too much. -- Mark Brown mailto:[EMAIL PROTECTED] (Trying to avoid grumpiness) http://www.tardis.ed.ac.uk/~broonie/ EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/ pgpZEJuOObpBM.pgp Description: PGP signature
Re: Postfix troubles
On Thu, Jun 29, 2000 at 10:25:25AM -0400, S.Salman Ahmed wrote: > I'll give that a try to see if that fixes the problem. Is there a > problem with my myorigin/mydestination variables above ? That looks reasonable, but according to the bounce you posted earlier on mail is actually being given a domain part of phoenix.phoenix. Try adding that to mydestination and see where that gets you. -- Mark Brown mailto:[EMAIL PROTECTED] (Trying to avoid grumpiness) http://www.tardis.ed.ac.uk/~broonie/ EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/ pgp4zSQk6AojU.pgp Description: PGP signature
Re: Postfix troubles
On Thu, Jun 29, 2000 at 01:19:06AM -0400, S.Salman Ahmed wrote: > But then how come sending email to [EMAIL PROTECTED] sends it correctly > to my local user account ? Why should [EMAIL PROTECTED] be treated/relayed > any differently than [EMAIL PROTECTED] ? Postfix does alias database rewrites at the local delivery stage. What is happening is that Postfix sees "[EMAIL PROTECTED]" and tries to deliver it locally. If the account is just an account (as for your user account) all is well. If the account is an alias then Postfix replaces the destination address with the address or addresses on the right hand side of the alias and starts delivering them. The problem is that your aliases have no domain part so Postfix puts a default in but isn't configured to deliver this default locally. What are the values of mydestination, myorigin, myhostname and mydomain? What is the output of "hostname"? A quick hack that should work around the problem would be to change your alias database to have right hand sides in [EMAIL PROTECTED] form. > But if I remove the relayhost line from /etc/main.cf, how will I be able > to send email to any other internet users e.g. this list, etc. ? Removing the relayhost won't help at all. By the time Postfix looks at the relayhost it has already decided to try to deliver the mail remotely. -- Mark Brown mailto:[EMAIL PROTECTED] (Trying to avoid grumpiness) http://www.tardis.ed.ac.uk/~broonie/ EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/ pgpzHOfm6kcbH.pgp Description: PGP signature
Re: Postfix troubles
Sorry for so many typos. (I didn't have many time) Greetings!
Re: Postfix troubles
-Former message- From: S.Salman Ahmed <[EMAIL PROTECTED]> To: Sended: Thursday, 27. June 2000 16:01 Subject: Re: Postfix troubles > > Yes, I do: > > # This is the aliases file - it says who gets mail for whom. > # It was originally generated by `eximconfig', part of the exim package > # distributed with Debian, but it may edited by the mail system administrator. > # This file originally generated by eximconfig at Mon Jun 26 19:00:46 EDT 2000 > # See exim info section for details of the things that can be configured here. > > postmaster: root > root: ssahmed > > daemon: root > bin: root > sys: root > sync: root > [snipped] > > I still can't understand why email to [EMAIL PROTECTED] and > [EMAIL PROTECTED] is relayed to my ISP. Here is the text of the > bounced message: > > > The original message was received at Tue, 27 Jun 2000 09:29:09 -0400 (EDT) > from dial-0625.tor.axxent.ca [216.249.2.117] > >- The following addresses had permanent fatal errors - > <[EMAIL PROTECTED]> > >- Transcript of session follows - > 550 <[EMAIL PROTECTED]>... Host unknown (Name server: phoenix.phoenix: host not found) > Reporting-MTA: dns; atlas.pathcom.com > Received-From-MTA: DNS; dial-0625.tor.axxent.ca > Arrival-Date: Tue, 27 Jun 2000 09:29:09 -0400 (EDT) > > Final-Recipient: RFC822; [EMAIL PROTECTED] > Action: failed > Status: 5.1.2 > Remote-MTA: DNS; phoenix.phoenix > Last-Attempt-Date: Tue, 27 Jun 2000 09:29:12 -0400 (EDT) > Return-Path: <[EMAIL PROTECTED]> > Received: from phoenix (dial-0625.tor.axxent.ca [216.249.2.117]) > by atlas.pathcom.com (8.9.3/8.9.3) with ESMTP id JAA27891 > for <[EMAIL PROTECTED]>; Tue, 27 Jun 2000 09:29:09 -0400 (EDT) > Received: by phoenix (Postfix) > id C1DAD19EB7; Tue, 27 Jun 2000 09:29:00 -0400 (EDT) > Delivered-To: [EMAIL PROTECTED] > Received: from phoenix.pathcom.com (phoenix [127.0.0.1]) > by phoenix (Postfix) with SMTP id A682419EB6 > for <[EMAIL PROTECTED]>; Tue, 27 Jun 2000 09:29:00 -0400 (EDT) > Date: Tue, 27 Jun 2000 09:29:00 -0400 > X-Mailer: 21.1 (patch 10) "Capitol Reef" XEmacs Lucid (via feedmail 9-beta-7 I); > VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid > MIME-Version: 1.0 > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > Message-ID: <[EMAIL PROTECTED]> > From: "S.Salman Ahmed" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: to root > Reply-To: [EMAIL PROTECTED] > X-No-Archive: Yes > X-Operating-System: Linux phoenix 2.2.15 i686 > > > -- > Salman Ahmed > ssahmed AT pathcom DOT com > > > /etc/hostname on my system contains "phoenix". Output of "postconf -n" > is : > > @phoenix:[/home/ssahmed] postconf -n > alias_database = hash:/etc/aliases > alias_maps = hash:/etc/aliases > command_directory = /usr/sbin > daemon_directory = /usr/lib/postfix > debug_peer_level = 2 > default_destination_concurrency_limit = 10 > defer_transports = > delay_warning_time = 4 > local_destination_concurrency_limit = 2 > mail_owner = postfix > myhostname = phoenix > myorigin = phoenix > queue_directory = /var/spool/postfix > relayhost = smtp.pathcom.com > > > Can anyone spot the problem ? > > Thanks. > > -- > Salman Ahmed > ssahmed AT pathcom DOT com > > http://www.pathcom.com/~ssahmed > GnuPG Key fingerprint = A6DB 6C85 DE5A 33BB E873 E437 58B2 09CD 977B 900B > > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > I don't know wether that could be the problem, but: In /etc/hostname you defined your hostname with "phoenix". But "localhost" is furthermore the same as "phoenix". Sending a message to [EMAIL PROTECTED] means sending a message to [EMAIL PROTECTED] But "phoenix" means to relay the message to [EMAIL PROTECTED] (see at the last line in /etc/hostname) That's why your E-Mail is always relayd to your ISP. You should check your /etc/aliases and delete the alias to the root. And also the relayhost. (smtp.pathcom.com) If you try to send a mail to your own root, you always will have to enter following recipint: [EMAIL PROTECTED] (there mustn't be any aliases to root or lacalhost) And if you try to send a message to your ISP-POP-account then you have to input: [EMAIL PROTECTED] You could only contruct an alias to these both (ssahmed and smpt.pathcom.com). But no aliases to root and localhost. Perhaps there's the problem.
Re: Postfix troubles
On Mon, Jun 26, 2000 at 08:36:21PM -0400, S.Salman Ahmed <[EMAIL PROTECTED]> wrote: > I am having some problems with Postfix. I added the following lines to > /etc/postfix/main.cf after reading the Postfix FAQ esp. the Dialup > section: > > relayhost = smtp.pathcom.com > > delay_warning_time = 4 > > With this configuration change, I can send email to non-local address > without any problems. > > Also, I am able to send email to my local account (ie > [EMAIL PROTECTED]). However, I can't seem to send email to the root user > locally. Whenever I try, Postfix relays email for [EMAIL PROTECTED] to my > ISP's smtp server which bounces it back to me. I also have to use a dialup account, and the only changes i made to the default Postfix configuration were the following lines: relayhost = mail.netdoor.com home_mailbox = Maildir/ The first line is related to the dialup link, and the second is for Maildirs. With this setup, i am able to send mail to root without problems. Do you have an alias for root in /etc/aliases? -- Eric Gillespie, Jr. <*> [EMAIL PROTECTED] "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." --RFC 1925 pgpAsmT5DHSDD.pgp Description: PGP signature