-2

I just ask this question in unix.stackexchange.com but I did not get any answer. I hope will lucky in here at least. Please ignore the question's stupidity. I am a noob to linux.

I was successfully configured Sendgrid into a Google Cloud Instance which is CPanel installed on CentOS. Here I have done it.

When install Postfix I have to remove currently installed exim4. Installation is successful, But I found sometimes Postfix is stopped. If I start using # postfix start again it will stopped in few minutes.

Below is the maillog:

# tail -n 30 /var/log/maillog

Jul 28 04:24:33 myhost postfix/qmgr[15174]: BAD9D110BEAB3: from=<root@myhost.localdomain>, size=3665, nrcpt=1 (queue active)
Jul 28 04:24:33 myhost postfix/smtp[15181]: BAD9D110BEAB3: to=<someperson@mycompany.com.au>, relay=smtp.sendgrid.net[167.89.125.25]:2525, delay=152, delays=152/0.02/0.1/0.03, dsn=2.0.0, status=sent (250 Ok: queued as q4j-M5JVRM61Sw9du237_g)
Jul 28 04:24:33 myhost postfix/qmgr[15174]: BAD9D110BEAB3: removed
Jul 28 04:24:33 myhost postfix/smtp[15177]: AA9A8110BEAA3: to=<someperson@mycompany.com.au>, relay=smtp.sendgrid.net[167.89.125.25]:2525, delay=577, delays=576/0.02/0.11/0.06, dsn=2.0.0, status=sent (250 Ok: queued as AcEHW3P5Q5K7PgnA0qvsYQ)
Jul 28 04:24:33 myhost postfix/qmgr[15174]: AA9A8110BEAA3: removed
Jul 28 04:24:33 myhost postfix/smtp[15180]: B5A5B110BEAB2: to=<someperson@mycompany.com.au>, relay=smtp.sendgrid.net[167.89.125.25]:2525, delay=152, delays=152/0.01/0.09/0.06, dsn=2.0.0, status=sent (250 Ok: queued as QumlXDnNQHekR3TnPfC_Kg)
Jul 28 04:24:33 myhost postfix/qmgr[15174]: B5A5B110BEAB2: removed
Jul 28 04:24:33 myhost postfix/smtp[15179]: B29A2110BEAA4: to=<someperson@mycompany.com.au>, relay=smtp.sendgrid.net[167.89.125.25]:2525, delay=577, delays=576/0.02/0.18/0.02, dsn=2.0.0, status=sent (250 Ok: queued as k-HSDlzjTPiR3mxxXWZj2A)
Jul 28 04:24:33 myhost postfix/qmgr[15174]: B29A2110BEAA4: removed
Jul 28 04:29:35 myhost spamc[15925]: connect to spamd on ::1 failed, retrying (#1 of 3): Connection refused
Jul 28 04:29:36 myhost spamd[1195]: zoom: able to use 996/997 'body_0' compiled rules (99.899%)
Jul 28 04:29:37 myhost spamd[1195]: spamd: server started on IO::Socket::INET [_]:783 (running version 3.4.1)
Jul 28 04:29:37 myhost spamd[1195]: spamd: server pid: 1195
Jul 28 04:29:37 myhost spamd[1195]: spamd: server successfully spawned child process, pid 15934
Jul 28 04:29:37 myhost spamd[1195]: prefork: child states: B
Jul 28 04:29:37 myhost spamd[15934]: spamd: connection from localhost [127.0.0.1]:39080 to port 783, fd 5
Jul 28 04:29:37 myhost spamd[1195]: spamd: server successfully spawned child process, pid 15935
Jul 28 04:29:37 myhost spamd[1195]: prefork: adjust: 0 idle children less than 1 minimum idle children. Increasing spamd children: 15935 started.
Jul 28 04:29:37 myhost spamd[1195]: prefork: child states: BI
Jul 28 04:29:37 myhost spamd[1195]: prefork: child states: II
Jul 28 04:29:37 myhost spamd[1195]: prefork: adjust: 2 idle children more than 1 maximum idle children. Decreasing spamd children: 15935 killed.
Jul 28 04:29:37 myhost spamd[1195]: prefork: child states: IK
Jul 28 04:29:37 myhost spamd[1195]: spamd: handled cleanup of child pid [15935] due to SIGCHLD: interrupted, signal 2 (0002)
Jul 28 04:29:37 myhost dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<6cb+IFlVIr1/AAAB>
Jul 28 04:29:38 myhost dovecot: lmtp(15985): Connect from local
Jul 28 04:29:38 myhost dovecot: lmtp(15985): Disconnect from local: Successful quit
Jul 28 04:29:38 myhost dovecot: imap-login: Login: user=<__cpanel__service__auth__imap__x4omw2slm18rtsvbmuqztk47y34ogk65i4b9jtgduyu1py...>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=15998, secured, session=<lGoLIVlV9Ld/AAAB>
Jul 28 04:29:38 myhost dovecot: imap(__cpanel__service__auth__imap__x4omw2slm18rtsvbmuqztk47y34ogk65i4b9jtgduyu1pylltnu7jebtjldvddpu): Logged out in=11, out=470, bytes=11/470
Jul 28 04:29:38 myhost postfix/master[15172]: terminating on signal 15
Jul 28 04:29:40 myhost postfix/sendmail[16036]: fatal: Recipient addresses must be specified on the command line or via the -t option

I want to know what is happening here and a way to keep Postfix continuously running?

  • 2
    Is there a specific reason you decided to remove Exim and install Postfix? cPanel basically turns the entire system into a closed appliance, and trying to remove/change major system components by hand is highly likely to break things. – USD Matt Aug 1 '17 at 15:33
  • You didn't get answers because everybody dislikes control panels. Try to focus in your questions to a cpanel-free solution. – peterh - Reinstate Monica Aug 2 '17 at 1:11
  • @USDMatt I forget to tell it on the question that I follow this tutorial. When I install the postfix it shows obsolete warning due to exim. so I blindly remove it and install postfix. – Niroshan Aug 2 '17 at 3:47
  • @peterh I know. But in here I am looking for the reason to postfix stop. Not a CPanel issue. – Niroshan Aug 2 '17 at 3:50
  • 1
    I wouldn't say everybody on here avoids control panel questions. The problem is that if the server contains a control panel, the basic rule is that you do not mess with anything manually. – USD Matt Aug 2 '17 at 8:30
0

As far as I'm aware Sendgrid is basically an email delivery service, so you're trying to use them as a smart host?

If you want to run a cPanel instance then I would highly advise you leave the software exactly as it is and either look in their documentation on how to set up a smart host, or contact their support for help. You do not need to use Postfix to talk to Sendgrid, every decent mail server will allow you to send email via an authenticated SMTP relay. Postfix is just the software Google use in their example.

Do not remove or change system software on a cPanel server, you will almost certainly break things.

If you don't need cPanel and specifically want to run Postfix, I would suggest you just create a bare Linux instance and install Postfix on that.

| improve this answer | |
  • It seems to be creating another instance with postfix is better as you suggested. Can I install exim back again? My cpanel instance work well for now without sending emails, will it be a trouble in future without exim? – Niroshan Aug 2 '17 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.