Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: oldtony on January 02, 2020, 02:20:37 AM

Title: need advise on email - have dynamic ip address - server only -have smtp email ad
Post by: oldtony on January 02, 2020, 02:20:37 AM
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

Title: Re: need advise on email - have dynamic ip address - server only -have smtp email ad
Post by: janet on January 02, 2020, 04:58:45 AM
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 ?
Title: Re: need advise on email - have dynamic ip address - server only -have smtp email ad
Post by: ReetP on January 02, 2020, 10:26:19 AM
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.