LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2013, 06:31 PM   #1
linoskoczek
LQ Newbie
 
Registered: Jul 2013
Location: Poland
Posts: 7

Rep: Reputation: Disabled
Question Mail forwarding with postfix problem


Hello!

I'd like to set up mail forwarding on my virtual Debian server. I've installed postfix and everything seemed to be fine. I sent a test message on my normal e-mail and it worked. The problem has began when I wanted to forward mails. I was following this tutorial, but forwarding doesn't work.

I've checked /var/log/mail.log and I've found one suspicious line:
Code:
Jul 23 23:19:56 vz13820 postfix/trivial-rewrite[9542]: warning: do not list domain e-cat.tk in BOTH mydestination and virtual_alias_domains
Here are my settings from /etc/postfix/main.cf
Code:
myhostname = e-cat.tk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_domains = e-cat.tk
virtual_alias_maps = hash:/etc/postfix/virtual
myorigin = /etc/mailname
mydestination = e-cat.tk, vz13820, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
So what I should edit in main.cf file? I was following this tutorial while setting postfix and I did like it was written.

Could you give me any solution for this problem?
 
Old 07-25-2013, 03:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well as per that doc, the virtual_alias configuration is only for other domains, not your actual local domain, so just remove those entries, and it should be OK.
 
1 members found this post helpful.
Old 07-25-2013, 12:55 PM   #3
linoskoczek
LQ Newbie
 
Registered: Jul 2013
Location: Poland
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you for answer.
I've changed it and I don't have such error in mail.log like before.

Now I've got:
Code:
Jul 25 17:43:19 vz13820 postfix/smtpd[27869]: connect from moh1-ve2.go2.pl[193.17.41.132]
Jul 25 17:43:19 vz13820 postfix/smtpd[27869]: 7C0306B287CF: client=moh1-ve2.go2.pl[193.17.41.132]
Jul 25 17:43:19 vz13820 postfix/smtpd[27869]: 7C0306B287CF: reject: RCPT from moh1-ve2.go2.pl[193.17.41.132]: 550 5.1.1 <test@e-cat.tk>: Recipient address rejected: User unknown in local recipient table; from=<mytestmail@o2.pl> to=<test@e-cat.tk> proto=ESMTP helo=<moh1-ve2.go2.pl>
Jul 25 17:43:19 vz13820 postfix/cleanup[27874]: 7C0306B287CF: message-id=<6009a16d.118cca1d.51f163b0.f0ae2@o2.pl>
Jul 25 17:43:19 vz13820 postfix/qmgr[27759]: 7C0306B287CF: from=<mytestmail@o2.pl>, size=828, nrcpt=1 (queue active)
Jul 25 17:43:19 vz13820 postfix/smtpd[27869]: disconnect from moh1-ve2.go2.pl[193.17.41.132]
Jul 25 17:43:19 vz13820 postfix/local[27875]: 7C0306B287CF: to=<root@e-cat.tk>, relay=local, delay=0.33, delays=0.32/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jul 25 17:43:19 vz13820 postfix/qmgr[27759]: 7C0306B287CF: removed
I recived message on same mail account from which I sent a test mail with such error:
Code:
<test@e-cat.tk>: host mail.e-cat.tk[91.228.198.252] said: 550 5.1.1
    <test@e-cat.tk>: Recipient address rejected: User unknown in local
    recipient table (in reply to RCPT TO command)
My /etc/postfix/virtual
Code:
root@e-cat.tk mymail@mail.com
test@e-cat.tk mymail@mail.com
test mymail@mail.com
(2x 'test' because I wanted to be sure)

Do I need to create a user "test"?

Other thing, mail which was sent correctly to "root" still isn't forwarded to my e-mail. What may be wrong now?

mail.log just when I sent message to 'root@e-cat.tk':
Code:
Jul 25 17:53:15 vz13820 postfix/smtpd[27924]: connect from moh2-ve3.go2.pl[193.17.41.208]
Jul 25 17:53:15 vz13820 postfix/smtpd[27924]: 4F18E6B287CF: client=moh2-ve3.go2.pl[193.17.41.208]
Jul 25 17:53:15 vz13820 postfix/cleanup[27929]: 4F18E6B287CF: message-id=<59de4ca2.3615156e.51f1660a.5c1f3@o2.pl>
Jul 25 17:53:15 vz13820 postfix/qmgr[27759]: 4F18E6B287CF: from=<mytestmail@o2.pl>, size=824, nrcpt=1 (queue active)
Jul 25 17:53:15 vz13820 postfix/smtpd[27924]: disconnect from moh2-ve3.go2.pl[193.17.41.208]
Jul 25 17:53:15 vz13820 postfix/local[27930]: 4F18E6B287CF: to=<root@e-cat.tk>, relay=local, delay=0.09, delays=0.08/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jul 25 17:53:15 vz13820 postfix/qmgr[27759]: 4F18E6B287CF: removed
The mail is delivered, but not forwarded as I said.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
postfix and mail forwarding ? lhrt Linux - Software 12 07-02-2007 06:25 AM
Forwarding incoming mail (postfix) herc Linux - Software 3 03-09-2007 04:43 PM
postfix forwarding mail problem smurfix Linux - Software 2 11-08-2004 08:57 PM
Forwarding mail through Postfix Phaethar Linux - Networking 0 03-01-2004 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration