• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 12.0 Preview

Status
Not open for further replies.
Hi,

The quota mails are a very good thing but it does not work completely with my architecture and its pity.

My architecture :

Customer/Visitor -> Varnish/Pound -> Web servers 1/2/3/4/5/6 -> Filer/SQL/Plesk/etc (I have scripts that deploy the necessary configuration on web servers).


If a customer sending an email through the SMTP server, plesk hopefully see.
If the client sent from PHP function, the web server will send Plesk will not see.
I transferred PHP emails to the Plesk server, but it does not want.

May 6 06:14:25 plesk12 postfix/cleanup[10715]: C42A4C3C73: message-id=<20140506041420.7141D1120AAC@web01>
May 6 06:14:25 plesk12 py_limit_out[10746]: DEBUG Running py-limit-out handler (context='limit')
May 6 06:14:25 plesk12 py_limit_out[10746]: DEBUG Generated new header X-PPP-Message-ID: <20140506041425.10746.37249@plesk12>
May 6 06:14:25 plesk12 py_limit_out[10746]: DEBUG Initializing connection to backend DB
May 6 06:14:25 plesk12 py_limit_out[10746]: INFO No SMTP AUTH and not running in sendmail context (incoming or unrestricted outgoing mail). SKIP message.

I added header : X-PPP-Vhost "myvhost.com", no change.
I added SetSysEnv PP_VHOST_ID "5b018d93-dbc7-456b-8fdd-d3df7ceca7c4", no change.
I copied the postfix-sendmail-wrapper file on the web server for try but it does not really work.

Fir the moment, i can :

May 6 06:35:29 web01 plesk sendmail[9114]: handlers_stderr: Mail handler call failed. Error occured during execv(/opt/psa/handlers/hooks/py-limit-out):#012No such file or directory.

I could emulate the rest, but this does not solve my problem, sqlite database is not accessible by multiple servers.
I need to break the skip (smtp auth or not running in sendmail context).
It is based on how to see sendmail context ?

Regards, Gurvan.
 
Last edited:
Loup Artic, could you clarify your setup? You have web servers that are not managed by Plesk, but your email is managed by Plesk on another server? Which version of Plesk preview are you using?

Why do you need to set up anything manually for outgoing mail control to work for you? Judging by the log excerpt this is for mail posted via SMTP, probably from outside or from inside but without SMTP AUTH. Are you aware that if you use this feature you should also remove all networks from whitelist in Plesk server-wide mail settings (otherwise anonymous submission via SMTP is allowed, which obviously cannot be tracked)?
 
It's not easy with my English.

Archi.png

Emails are managed by plesk only if SMTP auth.
For this mail PHP function, it passes through another machine (with sendmail/postfix). If I redirect mail from another machine on Plesk (by "relay = plesk-server" on main.cf), We do not support because it is not in sendmail context.

I spent the night over and it seems it lacks : May 6 06:55:22 plesk12 postfix/pickup[12997]: 6A70EC3CE5: uid=10000 from=<plesk12>
UID variable.

In python lib, i see three variable.

HEADER_PLESK_MESSAGE_ID = "X-PPP-Message-ID"

ENV_VHOSTID = "PPP_SENDER_VHOST_ID"
ENV_USERID = "PPP_SENDER_USER_ID"

X-PPP-Message-ID is generated by the script during limit check.
ENV_VHOSTID is set in apache configuration vhost.
For ENV_USERID, i have not found so I think it is based on the uid. (6A70EC3CE5: uid=10000 from=<plesk12>)


Quick question, if I go into plesk 12 "preview" at the final output I would only have to update or reinstall it must ?
 
Last edited:
Emails are managed by plesk only if SMTP auth.
For this mail PHP function, it passes through another machine (with sendmail/postfix). If I redirect mail from another machine on Plesk (by "relay = plesk-server" on main.cf), We do not support because it is not in sendmail context.

OK, I got it now. Obviously this Plesk feature wasn't designed to work for relayed mail the way you intend it to. By the way, you mean "relayhost" instead of "relay", don't you?

To fix the issue you probably need to configure mail relay to require authentication under your mail user accounts. Still you would probably have some issues with locally delivered mail (it might not be counted even then in this kind of setup). Regarding sending mail from scripts via sendmail (e.g. from PHP using mail() function): if this is not done on a Plesk host, you should prohibit this. Otherwise you would need to reinvent a sendmail wrapper employed in Plesk that will fit your environment.

i see three variable.

Manually setting any of the environment variables will not help you. Otherwise anyone could do that and trick the system. Also simply because you cannot do that in SMTP session.

Quick question, if I go into plesk 12 "preview" at the final output I would only have to update or reinstall it must ?

Not sure if I understood correctly. If you're asking whether you may upgrade from a preview version to the final release, then technically yes, nothing will prevent you from doing so. However, if memory serves me right, Parallels doesn't normally provide support for installations upgraded from preview versions, so you might want to reinstall nonetheless.
 
Thank for your answers :).

I thought a wrapper that will SMTP authentication for sendmail on a machine gateway with Plesk.
Or modify the python scripts to read special headers that I would add at this sendmail.
Or modify the php mail function to connect to the server Plesk and use the local sendmail.

I'll try update Plesk 11.5.44 to 12.0.17. 4736 Subscriptions, 5008 mailboxes and 1809 DB.
It will be fun :D.
For the support, its not a problem, we never used, i am very familiar and work with an PPE (Mickaël Salfati).
I will give you a feedback.

Gurvan.
 
Hello, iHuman

I responded you in private message, could you please provide me with additional information?
 
An problem with courrier-imap and httpdmng reconfigure crash with Details: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /opt/psa/admin/plib/Service/Agent/Transport/Util.php on line 183 (but i have a big value).

I look if the panel works well, for a preview version, that is a good job :).

Gurvan.
 
Well it seems that the system check outgoing does not work.

If I add a mailbox : mailmng-outgoing failed: ERROR:eek:utgoing:mails.domain_id may not be NULL
If test repair :

Code:
root@panel:~# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_imap_restore... ok
==> Checking for: mail_spam_restore... ok
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_drweb_restore... not found, skipped
==> Checking for: mail_outgoing_restore... fail
==> Checking for: mail_transport_restore... ok
Errors occured in mail restore procedure
Some utilities have exited with errors:
  /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore

Hooo, memory leak ? (try 256Mb, 512Mb, 1024Mb).
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 72 bytes) in /opt/psa/admin/externals/Zend/Db/Statement/Pdo.php on line 290

Now 2048MB :

Code:
root@panel:~# /usr/lib/plesk-9.0/remote_mail_restore/mail_outgoing_restore
PHP Warning: proc_open(): fork failed - Cannot allocate memory; File: /opt/psa/admin/plib/Service/Agent/Transport/Util.php, Line: 27

[2014-05-11 01:52:59] ERR [util_exec] proc_open failed:

I try with 30Gb :).

With 30Gb, its good for repair :).
sw-engine 1.5Gb for 10405 mailboxes.

After upgrade, I see that he missing hooks.

Clean install :

Code:
sqlite> select * from handlers;
1|4|0|10|spf|all|/opt/psa/handlers/hooks/spf|none|0
1|4|1|10|check-quota|all-recipients|/opt/psa/handlers/hooks/check-quota|none|0
4|4|1|10|check-quota|all-recipients|/opt/psa/handlers/hooks/check-quota|none|0
1|4|1|5|limit-out|all-recipients|/opt/psa/handlers/hooks/py-limit-out|limit|0
4|4|1|5|limit-out|all-recipients|/opt/psa/handlers/hooks/py-limit-out|limit|0

Upgrade :

Code:
sqlite> select * from handlers;
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
2|1|1|90|autoresponder|xxx|/opt/psa/handlers/hooks/autoresponder|responder|0
1|4|1|10|check-quota|all-recipients|/opt/psa/handlers/hooks/check-quota|none|0
4|4|1|10|check-quota|all-recipients|/opt/psa/handlers/hooks/check-quota|none|0
1|4|0|10|spf|all|/opt/psa/handlers/hooks/spf|none|0

I create the missing hooks and its good.

Code:
May 11 03:05:53 panel postfix/smtpd[20228]: connect from Axxx
May 11 03:05:53 panel postfix/smtpd[20228]: 9E71DA4639: client=xxx, sasl_method=DIGEST-MD5, sasl_username=xxx@xxx
May 11 03:05:53 panel postfix/cleanup[20232]: 9E71DA4639: message-id=<002201cf6cb5$283b9eb0$78b2dc10$@xxx>
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Running py-limit-out handler (context='limit')
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Generated new header X-PPP-Message-ID: <[email protected]>
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Initializing connection to backend DB
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Checking limits usage against following data: {'mail': {'mail_name': u'testgus7', 'out_limit': 10, '_id': 4677, 'domain_name': u'xx'}, 'whitelist': None, 'domain': {'out_limit': 50, '_id': 1691, 'main_domain_name': u'xxx', 'name': u'xxx'}, 'subscription': {'out_limit': 100, '_id': 1691, 'main_domain_name': u'xxx', 'allow_sendmail': 1}}
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Number of passed messages during last hour for mail is 0
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Checking against mail out_limit = 10: limit is not exceeded yet, passed only 0 messages during last hour
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Number of passed messages during last hour for domain is 0
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Checking against domain out_limit = 50: limit is not exceeded yet, passed only 0 messages during last hour
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Number of passed messages during last hour for subscription is 0
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Checking against subscription out_limit = 100: limit is not exceeded yet, passed only 0 messages during last hour
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Decision: message will be passed
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Checked the following objects: ['mail', 'domain', 'subscription']
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Exceeded limits for the following objects: []
May 11 03:05:53 panel py_limit_out[20233]: DEBUG Setting 'X-PPP-Vhost' header to 'xxx'
May 11 03:05:53 panel /usr/lib/plesk-9.0/psa-pc-remote[2634]: handlers_stderr: PASS
May 11 03:05:53 panel /usr/lib/plesk-9.0/psa-pc-remote[2634]: PASS during call 'limit-out' handler
May 11 03:05:53 panel /usr/lib/plesk-9.0/psa-pc-remote[2634]: handlers_stderr: SKIP
May 11 03:05:53 panel /usr/lib/plesk-9.0/psa-pc-remote[2634]: SKIP during call 'check-quota' handler
May 11 03:05:53 panel postfix/qmgr[5669]: 9E71DA4639: from=<[email protected]>, size=2789, nrcpt=1 (queue active)
May 11 03:05:56 panel postfix/smtpd[20228]: disconnect from xx]
May 11 03:06:00 panel postfix/smtp[20236]: 9E71DA4639: to=<xx>, relay=freeh-org01b.mail.eo.outlook.com[213.199.154.87]:25, delay=6.6, delays=0.25/0.01/5.6/0.76, dsn=2.6.0, status=sent (250 2.6.0 <002201cf6cb5$283b9eb0$78b2dc10$@xx> [InternalId=17055315132590, Hostname=AMSPR03MB407.eurprd03.prod.outlook.com] Queued mail for delivery)
May 11 03:06:00 panel postfix/qmgr[5669]: 9E71DA4639: removed

Last problem, quota management does not appear on panel.

Clean install : plesk12-clean.png

Upgrade : plesk12-upgrade.png

Last problem solved, need trial licence for active Outgoing mail.


The update is complete and functional :).

Gurvan.
 
Last edited:
The update is complete and functional :).

Great to hear that! Did you manage to use outgoing mail control in your architecture or on "vanilla" Plesk setup?

If I add a mailbox : mailmng-outgoing failed: ERROR:eek:utgoing:mails.domain_id may not be NULL

That's likely due to mail_outgoing_restore failed on upgrade.
With 30Gb, its good for repair :).
sw-engine 1.5Gb for 10405 mailboxes.

This is obviously a problem and should be fixed by Parallels. BTW, how many domains with mailboxes do you have, how many subscriptions with such domains?

After upgrade, I see that he missing hooks.
...
I create the missing hooks and its good.

This is again either due to mail_outgoing_restore problems or missing license.

Last problem, quota management does not appear on panel.
...
Last problem solved, need trial licence for active Outgoing mail.

Yes, this was due to missing license.
 
Hi,

I have 4741 subscriptions, 1 customer, 1810 databases, 5016 Mailboxes, 5360Mail groups. 1 domain = 1 subscription. I use Plesk so hidden behind another panel.
I was wrong, 5016 Mailbox in report but 10406 items for Outgoing Mail Control. There are duplicates.

13998321728322.png


Yes, this was due to missing license.

Even without a license, the system filtered well. I could not just set or modify settings without going through the PSA database.

This is again either due to mail_outgoing_restore problems or missing license.

I run mail_restore after adding the license but had not created the hooks.


Gurvan.
 
I have 4741 subscriptions, 1 customer, 1810 databases, 5016 Mailboxes, 5360Mail groups. 1 domain = 1 subscription. I use Plesk so hidden behind another panel.
I was wrong, 5016 Mailbox in report but 10406 items for Outgoing Mail Control. There are duplicates.

So, basically about 5000 subscriptions, each with 1 domain, each with about 1 mailbox and 1 maillist?

I run mail_restore after adding the license but had not created the hooks.

Did mail_restore succeed completely that time? If not, it's no wonder hooks weren't restored.
 
Plesk final release is not so far away, when do you plan to add support for Ubuntu 14.04 LTS?
 
Last edited:
updated PLESk on a server and I cannot see in mail settings the limit per account (or how it is called). On a fresh install on other server is there.
 
updated PLESk on a server and I cannot see in mail settings the limit per account (or how it is called). On a fresh install on other server is there.
Make sure that you have

Outgoing Mail Control On

in your license.
 
Key number PLSK.02095894.0020
Next license key update May 19, 2014
User accounts (resellers and customers) Unlimited
Domains Unlimited
Domain aliases Unlimited
Mail accounts Unlimited
Web users Unlimited
Language packs 2
Available languages Any language
Links for purchasing SSL certificates and domain registration services On
Valid for the following environments: Physical server or any virtualization solution
PostgreSQL database server support Off
Java applications Off
Traffic usage reports On
Notifications management On
Event manager On
Logging of actions performed by Plesk users On
Backup and restoration functions On
Subdomains management On
Adobe ColdFusion support Off
Sites published with Presence Builder 0
Migration & Transfer Manager On
Remote database hosting On
Mail queue management On
User accounts (resellers and customers) in Customer and Business Manager 0
Subscriptions management On
Accounts management On
Customers management On
Resellers management On
Custom View availability On
 
Status
Not open for further replies.
Back
Top