Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to mail another computer on my own network with postfix (ver 2.1.5 on Debian Sarge). When I mail my other computer, all mail is relayed through smarthost (my ISP's mail server. I don't want that Here is what I want:
Send email from alfa to beta and vice versa. If I send to an account on hotmail, it must go through my ISP's email-server (smarthost). I have accounts on my two computers with the same name. Is that a problem? I.e. sending mail from user@alfa to user@beta. I have no problems to send email locally (on the same computer) e.g. from user to root. If a do that user gets the mail as it should since /etc/aliases has a line saying:
root: user
Dont tell me to read the documentation! I've done so for days and days now and tried hundreds of ways without any success! That is so frustrating! Please, could any helpful soul guide me in the right direction.
I have configured my Debian Sarge system only by reading the documents to do http-server ftp-server X-window, streaming media setting up KDE and so on, but configuring an email-server has so far been a far to complex task for me. Why has it to be so hard?
MY computers have static ip's; 192.168.2.101 and 192.168.2.102, connected through a SMC router.
Yes i Have! It doesnt help me all. I've tried zillions (?) of combinations. Either I can only send mail to my other box on my intranet (192.168.2.x) or send to my ISP's smarthost depending if I comment out the line in /etc/postfix/main.cf:
relayhost = [my.isps.mailserver] #mail to internet
Sounds like you need to configure DNS (BIND) on one of your machines and create MX records for the mail servers so they know where to find each other...
Sounds like you need to configure DNS (BIND) on one of your machines and create MX records for the mail servers so they know where to find each other...
Are you really shure that I need bind? I have my /etc/hosts with values for my network boxes.
It works because I can refer to my boxes with their names (host1 and host2). Remember, my boxes dont have real names on the internet.
I cant access my mail servers from the internet because my ISP is blocking port 25. I dont need to either i.e I'm using smarthost.
If you don't care about names, you can just send mail to user@[192.168.2.101] without setting transports.
Thanks for your reply!
The transport file took care of sending email to my other box or my ISP's smarthost. But email to my other box isn't showing because it is relaying it to smarthost! I think I know why but I don't know how to fix it! It's kind of catch 22;
In order to send email out on the net (e.g. hotmail) I put a fake name in /etc/postfix/canonical: usr1 fake@hotmail.com
othervise my ISP's mail server will reject the mail. So far so good. But when sending mail on my intranet the other box will relay it to smarthost (ISP's mail server).
I've been playing with the files canonical and aliases with more variants I can remember but still no luck. I'm using mutt as MUA and the problem is I can't change the From: field depending if I want to send mail out on the internet or just locally on my intranet. Both my boxes has a user with the same name (usr1), but since the hostname is different it should't be a problem.
Thanks for your reply!
The transport file took care of sending email to my other box or my ISP's smarthost. But email to my other box isn't showing because it is relaying it to smarthost! I think I know why but I don't know how to fix it! It's kind of catch 22;
In order to send email out on the net (e.g. hotmail) I put a fake name in /etc/postfix/canonical: usr1 fake@hotmail.com
othervise my ISP's mail server will reject the mail. So far so good. But when sending mail on my intranet the other box will relay it to smarthost (ISP's mail server).
I've been playing with the files canonical and aliases with more variants I can remember but still no luck. I'm using mutt as MUA and the problem is I can't change the From: field depending if I want to send mail out on the internet or just locally on my intranet. Both my boxes has a user with the same name (usr1), but since the hostname is different it should't be a problem.
/snickie
I finally got it!
I added sender_canonical_maps (SEN) and recipient_canonical_maps (REC). In SEN I put: usr1 fake@hotmail.com
In REC i put: fake2@hotmail.com usr2
That made postfix deliver to my account in my other box without relaying it to smarthost.
Btw, changing fields in mutt didn't help. I think they only change the from field in the mail not the envelope which I think postfix is working with. Can anyone confirm this!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.