Add new smtp to my dedicated server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Add new smtp to my dedicated server
# 1  
Old 09-27-2013
Add new smtp to my dedicated server

Hi there,

I have a dedicated server that sends mail with own smtp (obviously).
On this server I have a web platform for music artists that allows entries for each enrollment and sends confirmation e-mails and so on ...

Now I have purchased a service smtp (like those of smtp.com) because I would like the email arrive to the recipient to avoid being falsely labeled as spam, and would like to know how to force the server to send all email system using precisely the account of smtp.com

I do not know if this is possible. Smilie

Thanks

Last edited by colorsthink; 10-02-2013 at 01:01 PM..
# 2  
Old 09-30-2013
If you want all the emails from your server to go via this mailer, you'd need to set your local mail subsystem to use this smtp.com one as a SMARTHOST (how to do this depends on your local mail subsystem but in sendmail it's a setting in the m4 file, or in the cf if you like to hurt yourself, in postfix it's a config variable in the postfix config).

If you just want your web form mails to use the service, find the SMTP settings in there and replace localhost with your smtp.com details.

By the way, have a look at mandrill.com for outbound email - I use this service and it's free for relativly low volumes of email (thousands of messages per month). I am not at all affiliated with them etc, I just happen to like this service Smilie
# 3  
Old 10-02-2013
Hi Smiling Dragon,

thanks for your reply Smilie

Yes, what I want to do is that everything that is sent from the server goes through an external SMTP service. In application (web form and so on ) I've already set my smtp.com details and all works fine.

So, I read what you write about smarthost, but unfortunately I'm a beginner and I don't know where to start ...
I began to study unix, and navigate folders on the server system too (root mode) I use cat - nano ad so on, but if you could tell me a little more precisely the paths where to look to change the settings I would be grateful. Smilie

How do I know what kind local mail subsystem my server use?

And after I locate the mail subsystem how do I make the change?

Smilie
# 4  
Old 10-02-2013
You can find your local mailer by seeing what's listening on the mail ports or by looking at the running processes and looking for mailers.

"ps -ef" and look for something like "sendmail" or "postfix" - one of these is most likely what you are running.

Then find the relevant config file (eg /etc/mail/sendmail.mc for sendmail, /etc/se/etc/postfix.conf I think for postfix).

A SMARTHOST is a config element that essentally says "just send everything that's not addressed to a local account on this server over to here and ask it to handle it for me".

I use a smarthost entry on my mail server to route all external mail through my ISP's mail server to prevent my outbound mails getting rejected as spam at the destination (they don't like dynamic IP address blocks as the source).

My sendmail.mc smarthost block:
Code:
# Route any mail not to be delivered locally to our ISP's smtp host 
# This stops other spam filters from rejecting mails from our dynamic address
define(`SMART_HOST',`smtp.smilingdragons.isp.com')

(Yes, that's not a typo, those are indeed combinations of backtick (`) and apostraphies (') around the names - the macro language used by the .mc file is annoying like that).

edit:
If you are running sendmail and update your .mc file, you then need to run "make" in that directory to automatically create the actual config file (sendmail.cf) and copy it into the right place. make should do this for you itself, but you can check this afterwards by running:
Code:
grep smtp.com /etc/sendmail.cf

and checking that your target smtp server made it in there.
Mine looks like
Code:
DSsmtp.smilingdragons.isp.com

(You can see why it's nicer to use the .mc file now right?)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Ubuntu

Any way we can create an SMTP server and use any scripting language to read emails from that server

Is there any way to create an SMTP mail server will all granular permissions to it so that I can read emails which that server receives through any scripting language and also reply from the same server automatically? (3 Replies)
Discussion started by: sandeepcm
3 Replies

2. Emergency UNIX and Linux Support

New centos dedicated server - cant get mysql working

Hi all, I installed centos 5, with LAMP. httpd is working fine, ssh, ftp all working ok. But, when I try to use mysql its not, when I give the command mysql I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (4 Replies)
Discussion started by: lawstudent
4 Replies

3. Linux

ipcheck problem in my dedicated server

Dear Friends, We have a 4 dedicated servers. All are working but the thing is one server is not working. when i go to network tools and after i enter my host domain i cant able to ping. it is showing host not found. But remaining servers are working. I terminate my account and re-again create... (4 Replies)
Discussion started by: mastansaheb
4 Replies

4. UNIX for Advanced & Expert Users

How to optimize apache and mysql on my dedicated server?

Hi, Any one please suggest me the best mysql, apache settings for the given below scenario. My Server config: Intel(R) Xeon(R) CPU E5504 @ 2.00GHz 8GB RAM 300GB HDD Website: It's a famous wordpress blog Mysql DB size: 235MB Expectations: Server should be handle 600+ concurrent... (0 Replies)
Discussion started by: chandranjoy
0 Replies

5. Shell Programming and Scripting

Send email from sendmail on AIX using exchange server as SMTP server

i am new in AIX i am trying to write a script to take a backup for specific files on server to and check error log if backup success send email to administrator , script done except for sending mail , i try to configure sendmail on aix to use our exchange server to send emails but still get error... (0 Replies)
Discussion started by: ahmed_salah
0 Replies

6. Emergency UNIX and Linux Support

Dedicated Server - Linux Mirror

Hi guys. I am gonna buy a dedicated server and make it a public mirror for some distributions. but how much RAM, Hard Disk, Band Width, ... will suffice? It will be a mirror for CentOS and Ubuntu both. (3 Replies)
Discussion started by: majid.merkava
3 Replies

7. IP Networking

Dedicated Server Move

I just moved a dedicated server, which included moving to a new subnet, and new IP address. Now my server is not reconnecting - I've tried ifconfig, altering the etc/hosts file with the new ip address, with no luck. (5 Replies)
Discussion started by: esmerika
5 Replies
Login or Register to Ask a Question