How to send mail

Not sure if this is a setting in Virtualmin, or what. I have 2 site that both send mail internally, but nothing is getting out. I have a Forum Invision Power Board 3.1.1 when someone register, it send a confirmation e-mail out to the customer, to verify email. It uses an internal e-mail client. but the email is not going through.

I also have a Store running (xcart 4.3) it uses e-mail to send out a download key to customers. It to uses an internal e-mail client, but none of its mail is gets out.

I tried a simple contact form on another site, and same thing with it, and it uses a php mailer. but nothing is getting out. I have the Firewall disabled, so it must be something with the server, maybe post-fix, I don't know. I'm not using any of the mail functions built into the server, so can I just disable them for now? out going mail is very important to both the store and forum. Please help.

Regards. Michael

Status: 
Closed (fixed)

Comments

You might want to check what gets logged to the /var/log/maillog file when you try to send email - you should see some error messages or useful log lines there.

Checking the log I see no errors at all. But every time I try to send a message from one of my sites, just a contact form, using a php mailer. it shuts down Postfix server. Do you know whats causing that?

I tried starting Sendmail mail Server, but it won't start.

Do I have to have Postfix server to send mail out, can't I just use an external mail server, like Roadrunner? I have an account there..

Michael

If you are sending email using PHP apps, you could just configure them to relay via your ISPs mail server. The exact way to set this up would depend on the PHP script though ..

That said, relaying via your local Postfix server should work fine. Is it actually running though? You can check for this on the System Information page that appears after you login to Virtualmin.

OK I played with this last night quite a bit, and a little this morning. It looks like if I turn Postfix on, in webmin under Postfix server at the bottom of the page, it shows up as being on, if I reload the page it asks if I want to start Postfix again.

If I go to Virtualmin/system Information Page, it shows Postfix as being off, If I click the little arrow next to the Postfix indicator, to turn it on, It again shows it as being on, But if I leave that page and go to another page and come back it is turned off again. Is this a problem with Postfix maybe. I have redirected my site back to the other server until I get this figured out.

I have been doing some reading on the mail servers, and it said to set up Qmail, you have to uninstall any other mail servers that might be using the same port. I have noticed that I have both Sendmail, and Postfix installed, I don't have Qmail so thats not a problem. Should I uninstall Sendmail? I'm tring to sue Postfix as the mail server.

Regards

Michael

It looks like Postfix is starting, then immediately crashing. You should check /var/log/maillog and see what lines are logged when you click the Start button ..

As for sendmail, it is OK to have it installed but not running. However, you can safely remove it if you like.

I could not figure out what was wrong with Postfix, but it looks like Sendmail is working right now. Is there any documentation for ether postfix, or Sendmal? Maybe it has something to do with the way there set up?

Thanks

Michael

Postfix should work fine, and I would recommend sticking with it, or else you will have a lot of re-configuration to do.

Maybe it should work fine, but its not working at all. I can't even keep it running. Send mail was not working ether, but at least it will stay running now. I would like to use postfix if I could get to to work.

This is the error message I get in the "maillog"

ul 16 09:44:34 asrservice postfix/master[7769]: fatal: /etc/postfix/master.cf: line 10: inet service cannot be private

and this is the line in my "master.cf"

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes
submission inet - - - - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=no -o smtpd_client_restrictions=permit_sasl_authenticated,reject
smtps inet - - - - - smtpd -o smtpd_tls_wrappermode=yes -o  smtpd_sasl_auth_enable=no -o smtpd_client_restrictions=permit_sasl_authenticated,reject
628 inet - - - - - qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
-o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache   unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

Michael

OK I think I figured it out, at least it didn't close after I started it. Will try to send messages out now.

Ya Postfix is finally working. Now I just need to figure out the alias file.

Michael