4

I'm using OSSEC and Nagios to build a sort of HID system on our network. Everything is going smoothly so far; however I cannot get OSSEC to send email alerts.

What I'm trying to do right now is get postfix to send out emails and then have OSSEC use postfix.

I know my ISP is blocking port 25, and I've read that I may need to redirect my email through another service (I'm using port 587). No other services (Gmail, Comcast) seem to be accepting my email though. After reading the logs, I see that the emails bounce because of; Gmail: "Must issue a STARTTLS command first" Comcast: "sender rejected : invalid sender domain"

Lastly, I do not have a FQDN that I'm using for this setup. I suspect that this may be the problem (which is why I included it in the question title) but I'm really not sure.

I'm unfamiliar with the details of how email works, and I'm not sure what the use of "/etc/mailname" or "myhostname"(in main.cf) is.

If you could answer any of these questions, it would be immensely helpful to me

-Can I actually send web mail without having a registered domain name? Or do all email services reject that as spam?

-Without a FQDN, what should i use for "/etc/mailname" and the "hostname" in main.cf?

-Are there any articles or resources on postfix that you think would be applicable to my situation?

I'd be very grateful for any light you might be able to shed on the situation; Thank you

2
  • You can make your MTA send using emails and relay in remote email domain e.g. sending via smtp.gmail.com relay (with SMTP authentication) using [email protected] (your mailbox email address) as sender address. I know it is possible using sendmail.
    – AnFi
    Commented Dec 27, 2015 at 14:24
  • See official Postfix docs: Postfix on hosts without a real Internet hostname
    – sebix
    Commented Jan 5, 2016 at 11:09

1 Answer 1

2
  • Can I actually send web mail without having a registered domain name?

Yes. You do need to send with a valid e-mail address as sender, though. Your best solution (if you do want to send e-mail) is to use an address and the relay server for that address. For example, use a gmail.com address and use an authenticated TLS port 587 connection to gmail to send your mail, even if the destination is not at gmail.

  • Without a FQDN, what should i use for "/etc/mailname" and the "hostname" in main.cf?

if you have a fixed IP address, you should have a FQDN, but as long as you use the solution above, it doesn't really matter.

  • Are there any articles or resources on postfix that you think would be applicable to my situation?

If you choose a gmail account to use for this, search for articles on setting up postfix to relay to gmail. My first result on google was http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html which seems concise and to the point. For other e-mail providers you should be able to find similar documentation.

I said above "if you do want to send e-mail". If you are configuring alerts, you way want to investigate free sms services as well.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .