Koozali.org: home of the SME Server

need advise on email - have dynamic ip address - server only -have smtp email ad

Offline oldtony

  • **
  • 58
  • +0/-0
    • http://www.ynotsoftware.com
Hi Experts -need advice on setting up email on  sme server 9.2 - have dynamic ip address - unit is server only - have working web page - have email info for sending  email, have smtp address and have pop address and required password. Just can't get it working. any advise would be appreciated. 

The below script does send smtp emails (password is changed) from command line:

declare -a myarray
let i=0
while IFS=$'\n' read -r line_data; do
  myarray="${array_element}" # Populate array.
    ((++i))
done < /appl/wolf/SendLists/HoldInfo1.dat
let i=0
while (( ${#myarray
  • } > i )); do

      printf "${myarray[i++]}\n"
done
    echo "$subjct"
    echo "$From"
    echo "$smtpServer"
exit
for item in `cat /appl/wolf/SendLists/emList.dat`
  do 
    cat /home/e-smith/files/ibays/Primary/files/emails/emailBody.txt | mailx -v -s "$subjct" -r "goodwolfkreek@gmail.com" -S smtp="smtpout.secureserver.net:80" -S smtp-use-starttls -S     smtp-auth=login -S smtp-auth-user="mugiedot@knownotexporter.com" -S smtp-auth-                password="abcdefg" -S ssl-verify=ignore -S nss-config-dir="/etc/pki/nssdb/" $item
 done

...

Offline janet

  • ****
  • 4,812
  • +0/-0
oldtony

Your question is vague !
Just exactly what does "Just can't get it working" actually mean ?

The mail server ?
The script ?
The website URL ?
Receiving mail sent to your domain address ?
?????

Somewhere, I assume in your modem /router/firewall (as SME server is in server only mode), you need to setup a dynamic IP client to update external records with your dynamic IP each time it changes.

Also you need appropriate port forwarding from firewall to SME server.
What are your overall network & firewall & SME server configurations ?
« Last Edit: January 02, 2020, 05:04:50 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Probably worth your time to have a comprehensive read of the manual.

See Email here:

https://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13

Your script seems to be sending via port 80 which is the http port and has little relevance to normal mail transport.

Suggest you look at the ports required for

Smtp/s 25/465/587
Pop/s 110/995
Imap/s 143/993

You may find outgoing mail direct from your server is not popular with many services and you may want to use the mail server at your ISP or other SMTP service.

However, that can also be problematic if they use say Office 365 which will require individual authentication per email account which SME can't do.

YMMV....

If you have multiple POP accounts there are contribs that will help manage that.

Anyways, read the manual and links first.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation