Sending mail with Postfix - need help

Hi all. I apologize in advance for the length of this post, and yes, I realize this is an impossibly simple task I’m asking for help with, but I have tried, honest I have.

I am dealing with my first Linux pc and learning has been a slow and sometimes painful experience, but I have managed to set up a “headless” file server using SuSe 11.1, and successfully set up a RAID 1 array to store all the data for two Vista clients that are also on the network. File sharing works great and I’m happy with that…BUT.

All I want is some method for the Linux server to notify my Vista machine if one of the disks in the RAID dies. It seems like it should be incredibly simple to set up using mdadm, and in fact, I have managed to set up mdadm to automatically send email test messages to a local account. What I can’t get working is the process of sending email to my “regular” email account,

I know there is a ton of stuff on how to accomplish this out on the 'net. I’ve read so many “how-to’s” and tutorials on configuring Postfix that I’ve literally lost count days ago. Some of them were really good, some weren’t so good but all were helpful to some degree. But I can’t seem to send any type of email from the linux machine. I’ve tried so many hints and tips that I very well may have confuzzled the whole system where nothing will work even if I do it right at this point, but if so I don’t mind (as a last resort) wiping the disk and reinstalling Linux from scratch. I’ve used a .forward file to forward root’s email to my bellsouth address. I’ve used MAILADDR in the mdadm.conf file to point to the bellsouth address. Neither method works for me though.

Here’s what’s happening at this point. Test emails sent from the Linux system to “” do not get delivered. BUT, I do get a bounce notification that IS delivered to the account, which tells me that “ requires valid sender domain (in reply to RCPT TO command)”.

I have never messed with setting up a mail server of any type before this. And until 3 weeks ago had never messed with Linux at all. So I expect many of you are either shaking your heads in dismay or laughing your tails off at my ignorance, but I’m desperate :).

What is the simplest way to send notification to a client machine that there is a problem with the RAID array on the server? Is it email or is it something else? If it would be easier, I don’t mind setting Outlook on my Vista machine to go fetch email from the server, but I haven’t been able to configure it to do so, at least not yet.

Most importantly, can someone please point me to the “best” how-to for a total beginner to set up whatever system is recommended?

Sorry…I know this is long but I’m hoping someone will take pity on me. My head has been hurting for four days now from banging it against this particular brick wall and I am about ready to give it up. Except I’m too neurotic to admit defeat and this will bug me forever until I get it working.

Thanks much,


OK I’ve done this only once…

But is this a dynamic ip you’re sending from? If so I got a feeling this is the problem and you need to find a way of sending it via elsewhere. Like through your ISP mail server.

Hopefully what I’ve just typed makes a little sense to you, as like you when I did it my head was spinning, but I’m guessing you may of stumbled across this on your travels.

What I found was one of my accs would bounce it but another wouldn’t. It can also use the DNS server to do it but this will depend on the acc. Some email accs don’t like it straight from dynamic IP’s

Hopefully I’m not barking up the wrong tree and if completely wrong someone else will point you in the right direction. But it certainly sounds like the trouble I encountered.

I’m presuming that you can recieve mail at least.

Here’s what’s happening at this point. Test emails sent from the Linux system to “” do not get delivered. BUT, I do get a bounce notification that IS delivered to the account, which tells me that “ requires valid sender domain (in reply to RCPT TO command)”.

This means that your setup is correct and the test mail actually got sent to the server. They rejected it because they found that a mail was received from a server with invalid domain - meaning, your server does not have a registered domain. Mail servers are generally set up to reject this sort of emails to avoid spam mails (Otherwise, theoretically anyone can send spam mails like this impersonating as someone else).

You have to change the setup to connect to the ISP’s SMTP port for sending mails, rather than through the Postfix program. (I don’t know how to do it in your RAID configuration files, but someone else can help).

Most mail receiving servers are set up to reject mail from home connections because chances are they are hijacked PCs sending out spam. You wouldn’t believe the amount of attempts from such machines until you see a log of a typical mail server. It is probably the single most effective spam block for a mail server and you don’t even have to handle the mail, just to look at the sender’s IP address.

How does the receiving mail server know it’s a home connection? ISPs voluntarily declare their dynamic ranges to various blacklists. Sometimes if they don’t, those ranges are put in by volunteers anyway.

So the upshot is, to get mail out from your machine, you should relay it to your ISP’s mailserver. There’s a postfix setting for the relay host you can set.

Of course, malware is getting smarter too and starting to read mail program settings to discover the relay host setting. It’s a never-ending arms race.

Hi and thanks for the assistance everyone. I didn’t do a great job of describing all the things I’ve attempted, because the post was already too long. But, the server is behind a router and the network has a static WAN IP. I have already set up “” (both with and without brackets around the name)as a relay host in the postfix file. Mail still bounces with the same error message whether I use the relay or not. My static IP address is assigned by bellsouth so this machine should be able to send via smtp to their servers, if I understand correctly.

One thing that has me very confused is that the “bounced” messages seem to originate from the Linux box, and they are delivered to my external email just fine. But if an automatically generated message like that gets delivered, why doesn’t the original email? I’m sure I’m missing something obvious. And it’s probably something I’ve done to myself by attempting to change configurations based on multiple online tutorials but without really knowing what I’m doing.

Anyway, at this point my efforts are focused on simply sending email period. If I can make that work I’m not worried about mdadm…I can make it send notification to whomever I want. It just doesn’t get delivered to any external email.

Sounds like a misconfiguration of postfix then.

You should look at the mail headers, especially the Received: lines, those will tell you who handed what to who when. Also the mail log, /var/log/mail.

Ken, thanks. I’ll just keep looking for a tutorial that I can understand and follow and hope for the best.

The out-of-the box config for Postfix on openSUSE only needs a couple of setting changes for it to work as a forwarder. If you are massively changing, you are doing it wrong. Generally you only need to change a couple of things in /etc/sysconfig/postfix with YaST. These are:

POSTFIX_ADD_MYNETWORKS_STYLE (if you need to send from other machines on your LAN, and also look at SMTPD_LISTEN_REMOTE, see below)

And in /etc/sysconfig/mail:


This assumes you trust your LAN and you are behind a firewall. If mail is generated only from the machine itself, then you don’t need to change POSTFIX_ADD_MYNETWORKS_STYLE or SMTPD_LISTEN_REMOTE. The FROM_HEADER is what sets your outgoing mail to a believable domain, rather than some random name assigned to your machine by DHCP. But that is overrriden by what your mail program uses anyway.

One more point:
Some ISP mail service do not “relay” your mails unless you have an agreement with them to do so. Also, they may need you to authenticate. (I don’t know how that part is done in Postfix - I am not a Postfix expert :frowning: ).

Anyway, try sending it as suggested by ken_yap and then we will see.