Hi James ... What version of Postfixadmin are you trying to use, and what version of PHP are you trying to use? It looks like there's an issue with PHP coping with shorttags (<? vs <?php) - which feels like it was an issue a long time ago. Note - you'll get a better/quicker answer on github.com/postfixadmin/postfixadmin - we're not using the sourceforge site any longer.
You probably need to escape the '.' in your regex - else it'll match any character. Try e.g. /.tld$/ REJECT blah blah You should also be able to query that table/file using postmap - which might help you diagnose if you've got your syntax correct - e.g. something like : postmap -q pcre:/path/to/something blah.bar.com if my memory serves me correctly.
Hi, What versions of PostfixAdmin and PHP are you using? thanks David.
see https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/HASHING.md
Is there anything logged in the PHP / apache / webserver error log?
For the above, i suspect you don't have the PHP module enabled within Apache ( ? ) - it looks like it's just echoing out the PHP source code. Try : apt-get install libapache2-mod-php7.4 or .... 8.0 ? (I'm not sure what version of PHP ubuntu 22.04 shipped with)
I can't easily search the discussion here (sourceforge is slow/clunky). Try changing the pagination size settings in config.inc.php and see if that makes any difference? Can you run that SQL manually on the MySQL command line ? (it works for me, but I don't know what version of MySQL you're trying to use).
upgrade to a newer version of Postfixadmin - see github.com/postfixadmin/postfixadmin ...
Hi Dean I would suspect that your version of MySQL has been updated by your hosting company, and that's causing problems. From looking at https://anoox.com/postfixadmin/login.php - it says you're running Postfixadmin 2.92, which is quite old. I'd suggest you try and find the webserver's error log (perhaps /var/log/httpd/error.log ?) and see if that gives more information about what it didn't like in the SQL.
Just for clarification, where is the best place to post ? probably github ....
er what?
"Please contact your Internet service provider since part of their network is on our block list (S3140). " So your ISP has been blacklisted. I believe this is fairly common for consumer facing broadband addresses. There is no real solution - either change provider (and hope they're not blacklisted) or get a virtual machine somewhere and relay out through that (or the ISPs own outbound SMTP server). You can face a similar problem with using a virtual machine - some providers have a poor reputation...
Hi - you're confusing this project (postfixadmin, a web ui for managing mailboxes etc) with a help forum for general postfix issues.... Having said that ... Postfix isn't likely to be blocking emails to domains like icloud/gmail - it's more likely to be the other way around - in that they're blocking you because e..g you don't have reverse dns setup, or they think you don't have enough "reputation" to email at the rate you are. But I may be wrong - seeing a bounce message / server log would probably...
Hi - yes - there are changes on the 'master' branch that should be doing this.
You've not provided much information for anyone to help you there.
Home
what page/url are you on ? Is there anything special about your data - e..g you have a lot of records?
ergh, what horrible formatting.
Ah - sorry, I was grabbing a few minutes on my laptop and trying to catch up with stuff and didn't dive into the code to give you a proper answer. Yes, your variant above will work fine. Alternatively try : function check_domain($domain) { if(preg_match('/[a-z]{2}/i', $domain)) { return ''; } return sprintf(Config::lang('pInvalidDomainRegex'), htmlentities($domain)); }
I think you're asking that the regex just accepts anything longer than a couple of characters? so .e.g "/[a-z]/i" ? :)
Ah ok - well, you should be able to migrate - dovecot / whatever should be able to cope with a different crypt format and just work. Postfixadmin should be OK - for v3.3.x you're going to have to be using a $CONF['encrypt'] = 'dovecot:ARGON2I'; and then it really just comes down to 'doveadm pw' supporting it ...
Hi - Postfixadmin should be happy enough with SHA512 crypt - see https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/HASHING.md I think if you're using the 3.3.x branch, I think you need $CONF['encrypt'] = 'php_crypt:SHA512'; If you're using 'master' you can just use : $CONF['encrypt'] = 'SHA512-CRYPT';
Kristy - I think purging MariaDB would remove your MySQL files. Please feel free to include a link to your own mail admin app here, so others can also benefit from it.
Hi Kristy, Postfixadmin's package is handled by volunteers through Debian/Ubuntu. Assuming you're using 'focal' you'd be installing this package : https://packages.ubuntu.com/focal/postfixadmin When you go to install a package, you will get prompted "Do you want to continue" if it is going to trigger the removal of something already installed. Removal of data will normally only happen if you do a --purge on removal, so you should still have the data files in /var/lib/mysql, and you should still have...
Hi - I suspect you've edited config.inc.php and not closed a quote, or missed a semi colon off.
Hi - See https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/Password_Expiration.md
Hi James, see also : https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/HASHING.md#dovecotcrypt-method Sorry, I was in the middle of doing things yesterday and didn't have the time to reply in a more coherent manner. Glad the feature branch works for you - I need to fix the issue of composer/dependencies and merge it into master ....
The shortest answer - if you can try using the 'feature-improve-pacrypt' branch on github. Failing that, your problem is probably due to dovecot - if you change to the web server user and run the doveadm pw command you'll probably see a permission issue with the dovecot config. The issue has been discussed a few times on the github issue tracker.
the webserver logs should give you an idea of why you had a http 500 ....
Sorry - I thought I'd replied this morning saying "it should work" but it seems by web browser had other ideas ... Glad to hear it all went well!
Ah, sorry, perhaps I misunderstood your problem. I don't know - what do you see in your mydomain.net server's mail log?
Hi - this probably isn't a PostfixAdmin question but ... I suspect the SPF rule that is in DNS for the site is to blame - netdata.cloud descriptive text "v=spf1 include:_spf.google.com include:u8647778.wl029.sendgrid.net -all" many third parties will think that "Oh, look, there's email from foobar@netdata.cloud, and it's coming from the IP 1.2.3.4 .. which isn't covered by the SPF rule ... so it must be spam ... "
you should see the same domains and mailboxes - if you're not, is it possible you're using the wrong database somehow? Try editing public/index.php and var_dump($CONF); near the top .... I'd guess you've perhaps got a mixture of a debian package (so /etc/postfixadmin/...) and a manual install (via git) and there's confusion over which database/code is running.
Try running "php public/upgrade.php" on the command line, it might tell you something?
Look in the Apache ( ? ) error log file. It probably contains more information.
You need to use one of the 3.2 branch releases if you want to continue using PHP before 7.0. e.g. https://github.com/postfixadmin/postfixadmin/releases/tag/postfixadmin-3.2.4
Hi - it doesn't need to be on the same server, but there are some reasons why you might want it to be on the same server ... e..g if you require a mailbox post creation or post delete script to run, and it requires filesystem access (of course you could use ssh, and avoid this) Otherwise, Postfixadmin is basically just writing to the appropriate database, so could be on a separate server from the other components if that is what you wish to do.
it's in the public directory. See attached image.
yeah, and that's the jquery we're including/loading.
I think we're only using jquery because of bootstrap - e.g. https://getbootstrap.com/docs/3.4/getting-started/
Yeah, I agree, we should be defining one really. see https://github.com/postfixadmin/postfixadmin/issues/497
I think you might be able to. The main reason Postfixadmin doesn't do utf-8 everywhere is that domains need to be latin1 (don't really support unicode) and until recently there was some issue with MySQL not coping with indexes on a field that was larger than X bytes .... I don't remember the details now though sorry.... Your better bet is to get all columns to be latin1_general_ci
The issue is your content security policy. If you remove it's configuration from Apache, you should find that everything works. The undefined index notice message shouldn't affect anything.
I don't have much experience with CSP headers I'm afraid; but your problem is that they're not allowing the bootstrap theme to show. Header always set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; frame-src 'self'; connect-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self'" ?
Aaaaah. Try adding : header("Content-Security-Policy: default-src 'self'; img-src 'self'"); to config.local.php (I'm guessing that's a correct CSP for PostfixAdmin as I don't think we have any external dependencies).
oh, fine ... that hopefully shows you don't have two instances of Postfixadmin installed! :) When you view the user vacation page, are there any assets not being downloaded ? Is anything showing up in the browser's developer console ? See attached from my dev/test site ...
can you stick a 'die("blahblahblah");' into one of the PHP scripts (e.g public/vacation.php and check that you don't have two postfixadmins installed ?
ah, you need to change the collation one of the columns so they match.... You're using this query : query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active='1' AND alias_domain.active='1' So I assume it's moaning about : and alias.address = CONCAT('%u', '@', alias_domain.target_domain) SELECT * FROM information_schema.COLUMNS WHERE table_schema = 'postfixadmin' AND collation_name != 'latin1_general_ci';...
Hi - I suspect the codebase has diverged significantly enough from that over the last 6 years to make it impractical to merge/support.
Is there more information in Postfix's log file ? (/var/log/mail.log) ? What's the output from e.g. postmap -q someone@yourdomain.com mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf ?
https://github.com/postfixadmin/postfixadmin/commit/ad342e1d67127b555def97406fc1f810e18f7347 and https://github.com/postfixadmin/postfixadmin/commit/5a305bc830936a302cf7e0a228651ef292069f2b
ah - it looks like the field was originally just a date field, so we assumed the time was 00:00:00 and 23:59:59 ... I've changed this in master & postfixadmin_3.3 ... please test again? thanks!
Ah, I've no idea why the readonly=readonly thing is / was there. It's removed now from master & postfixadmin_3.3 branches on github. It'll find it's way into 3.3.10 whenever that gets released.
Ergh. Well spotted. Fixed. I think we need to think of some way of removing SourceForge, and just relying on GitHub as the duplication is a pain.
Hi - how you upgrade depends on how you installed postfixadmin. If you had cloned the github url, then you need a git fetch / rebase or something. If you installed PostfixAdmin from a .deb / .rpm, then the distro will have handled most things. If you'd installed from source, take a backup of the postfixadmin 'home' directory, extract the new version over the top and run 'http://whatever/postfixadmin/upgrade.php' in a web browser. Major changes I can remember : The format of the setup_password hash...
Hi Sidney - PostfixAdmin needs a database backend (mysql, postgresql or sqlite). PostfixAdmin does not support a file backend. You can configure Postfix to support both if you really want, although I suspect you'd find it confusing. You might be able to configure Dovcot to support both backends, I'm not sure. I suspect you'd be better off migrating from your file backend to a database one. You should be able to keep your existing password hashes, so users shouldn't need to do anything (like resetting...
PostfixAdmin doesn't need to be on your mail server, although many people will run all three on the same server. Just be aware that e.g. a mailbox postcreation shell script may have problems running if Postfixadmin isn't on the same server as the mail directories :)
Hi - if you only have a few domains / mailboxes, then I think you'll save yourself headaches by just manually copying things over. You could populate an empty postfixadmin database using your existing one - in so far as PostfixAdmin should be happy with SHA512-CRYPT passwords, and should be able to use the same maildir's ... it's just the table names/columns and postfix config file queries are different. ( $CONF['encrypt'] = 'php_crypt:SHA512' perhaps )
I'll take a stab in the dark and guess you're using Dovecot. It's probably moaning about the permissions of a config file / ssl certificate. Firstly, as you're using FPM, PHP's errors probably won't show up in the nginx error log file. They'll be in something like /var/log/php7.2-fpm.log (for example). Secondly, see this which might help - https://github.com/postfixadmin/postfixadmin/blob/582b5e91b96c9a5abb8f3bcbb44645a0b653bf4f/DOCUMENTS/DOVECOT.txt#L140
Hi, You need to upgrade your PHP version. Postfixadmin 3.3.0+ requires PHP 7.0 or above. Specifically, your version of PHP does not understand the return type annotation as shown here - https://github.com/postfixadmin/postfixadmin/blob/582b5e91b96c9a5abb8f3bcbb44645a0b653bf4f/model/Config.php#L48 Sorry for not making it more obvious; I thought setup.php emitted a warning to this effect, but it's possible that wouldn't load if you're running PHP 5.6!
you could make it a symlink to somewhere else?
see https://github.com/postfixadmin/postfixadmin/issues/416 - it was an issue from moving to the bootstrap based theme i tihnk. Should be fixed in v3.3.2
What hash format do you have setup for Postfix/Dovecot? MD5 ? I don't think Postfixadmin supports Argon (unless it's something dovecot can handle).
see functions.inc.php -> the pacrypt() function : https://github.com/postfixadmin/postfixadmin/blob/92a7042ba15958b2fef116ddbcbc5ad1387f2f1a/functions.inc.php#L1226
I like the idea of icons instead of textual labels for edit etc. I'm happy with the idea of making the labels more consistent - if "alias" means nothing to people, and "forward" makes more sense, then fine. It's not something I'd thought about. Re-translating various strings is kind of a pain though.
try : https://github.com/postfixadmin/postfixadmin/releases/tag/postfixadmin-3.3-unstable note the "unstable" bit in the url ... I may forget to update this tag, delete it or whatever.
Hi - there's https://github.com/postfixadmin/postfixadmin/tree/feature-refactor-login-etc - which might become postfixadmin 3.4 - which defaults to using bootstrap (and changing those edit links to be buttons etc etc)....
I'd only be able to do it through use of a content_filter (and therefore some coding is required).
Stop Postfix / Dovecot etc; move the maildirs and create a symlink so the old path continues to work .... then restart Postfix + Dovecot etc.
Hi - The templates_c directory is just something Smarty uses - unfortunately I've never figured out how to stop Smarty from trying to use it .... Just creating a 'templates_c' directory that's writeable by the webserver should be sufficient. David
Hi - PostfixAdmin historically didn't send much (a welcome email?) email - and would have probably have been installed on the Postfix server - so could get away with sending everything locally. Because of this, PostfixAdmin has only basic SMTP sending functionality - see https://github.com/postfixadmin/postfixadmin/blob/3d46ec795969f76604a8ed522df130548ae428c2/functions.inc.php#L1408 It's probably past time that it was changed to use an SMTP library, which would hopefully add support for the various...
I'd expect you to get a mailbox out when querying the mysql_virtual_mailbox_maps.cf thing ... so nothing interesting there. Not getting something back from the virtual alias maps is presumably a problem. What data is in database table? what is in your mysql_virtual_alias_map.cf?
(So your variant is up to date .... it just doesn't realise it is up to date!)
functions.inc.php hadn't been updated with a newer version number.... hopefully this will be fixed in the next (eventual) release! :-)
Sounds relevant for https://github.com/postfixadmin/postfixadmin/issues/381
(add into config.local.php )
you need $CONF['footer_link'] = 'https://some.url.com'; and $CONF['footer_text'] = 'My Mega Corp Ltd';
I think you'd need to use something like procmail for this. Note - this project is a web based interface for managing mailboxes/aliases/domains for use by Postfix. It is NOT a general help forum for Postfix, so you will probably find better answers elsewhere :-)
This project is for 'postfixadmin' a web based tool to manage mailboxes/aliases within Postfix. It's probably not the best place to ask for help with issues about other applications. Having said that, try running 'postfix status', 'postfix check' .... and/or 'postfix set-permissions' ?
Try to avoid confusing Postfix with PostfixAdmin. If Postfix is not working, try : "postfix check" or look in e.g. /var/log/mail.log (or equivalent).
Symlinking templates_c to templates seems a really weird thing to do. Smarty SHOULD compile things from 'templates' and store that compiled stuff in 'templates_c' (cached templates). templates_c needs to be writeable by the webserver. Where it is has changed a little over the years - but you could have it set to /tmp/templates_c if you're not sharing the webserver with anything else. Currently in version 3.2 we have this logic for templates_c -> which should be using a templates_c directory in the...
I patched up this - https://github.com/DAvidGoodwin/amavisd-wblist to help with amavisd a year or two ago; but it's pretty limited and probably not easy to deploy. PostfixAdmin doesn't handle * shared mailboxes (that'd be courier or dovecot's problem) * distribution groups (it kind of can through a bulk alias, and i think Postfix has some limited support for them, but it's not a feature), * sieve filters (again dovecot problem) , etc..
This isn't a generic mailing list for postfix help. It's for a web based application that helps you manage mailboxes/aliases. I don't see what relevance an Active Directory username has when talking to google, or doing smtp auth out. David.
Hi - this forum isn't the right place for generic postfix questions - it's for a project that provides a web interface to managing mailboxes/aliases etc for postfix servers. Having said that, it's nothing to be worried about. I think there's a debug/verbose mode you can turn on somewhere to log exactly what's happening if you are concerned. Perhaps : http://www.postfix.org/DEBUG_README.html#debug_peer will help ?
smtp.testdomain.com requires authentication for you to relay through it. Try e.g. smtp_sasl_auth_enable = yes smtp_tls_security_level = encrypt smtp_sasl_tls_security_options = noanonymous relayhost = [smtp.testdomain.com]:587 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd and put something like this in /etc/postfix/sasl_passwd .... [smtp.testdomain.com]:587 my@username:TopSecretPassword then run : postmap hash:/etc/postfix/sasl_passwd and restart postfix. David.
Hi - firstly this isn't really a question about postfixadmin. It sounds like a generic postfix question, and this isn't really the place for that. However, from my limited knowledge, TLS is just a wrapper around SSL (I think it just handles the SSL cipher and protocol selection). So, if you're using TLS you are also using SSL. You probably want to disable some weak SSL and TLS versions. I have the following ssl config stuff in my postfix main.cf : # SSL support for SMTP (for receiving from clients...
The checks are just based on the presence of various PHP functions or extensions. So .... it's not really a case of requiring php5-mbstring .... So .... perhaps we should be more vague with the suggestions! :)
What version of Postfixadmin are you trying to install ? It should work fine with PHP 7.x, and the next version will probably be only for PHP 7.x.
..... contribute code, contribute in any discussions, testing and bug reporting? (all via https://github.com/postfixadmin/postfixadmin)
No, it's fine.
Hi - Ideally, create a "Pull Request" on github.com/postfixadmin/postfixadmin. Alternatively, assuming you have a github account .... Find the language file you want to edit on github (for example: https://github.com/postfixadmin/postfixadmin/blob/master/languages/cn.lang ) and click on the pencil and then make changes .... github should prompt you to fork/create a Pull Reqest when you click Save or whatever at the bottom of the page. Failing all of the above, make whatever changes you see fit and...
try using your browser's dom & network inspector to figure out what's triggering that message.
Yes - there's an smtp_mail() function which is what the welcome email uses (as does the "email everyone" or the "password recovery" stuff). You'll need to make sure you have a few things in your config file specified (look for anything starting with "smtp_". https://github.com/postfixadmin/postfixadmin/blob/master/functions.inc.php#L1358 I suspect really the smtp_mail functionality should be replaced by something like SwiftMailer so it handles ssl or whatever better.
Did you restart postfix after changing the config ?
Postfixadmin 3.2, using PostgreSQL db ( v9.4 ) scripts/postfixadmin-cli admin add superadmin@example.com --password demo-pw12 --password2 demo-pw12 --superadmin 1 Welcome to Postfixadmin-CLI v0.2 The admin superadmin@example.com has been added! scripts/postfixadmin-cli admin view superadmin@example.com Welcome to Postfixadmin-CLI v0.2 Admin: superadmin@example.com Domains: Super admin Active: YES Last modified: 2020-03-10 postfixadmin=# select username,superadmin From admin where username like 'super%';...
I think your problem is within Postfix. This project is for a web interface to help add/manage mailboxes etc on a Postfix server. It's not a support forum for Postfix itself. I think you need to look at http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions ? But I don't think you can get an instant warning AND have the server keep retrying.
I think the first line of your vacation.pl script is wrong. Either, you don't have perl installed in the right place, or you have some sort of extra space that's breaking the normal #! expansion. !/usr/bin/perl -w should be the first line; I'll guess you either don't have that OR it has a space somewhere in it. So the system is trying to execute it (vacation.pl) as a bash script instead of a perl script.
Try making sure you have perl installed, and the path to perl matches that in the first line of vacation.pl. I think your error messages are showing the system is trying to execute the perl script (vacation.pl) as a shell script or something similar. It's easier if you paste in the log messages as text rather than attaching an image.
Try making SSL optional on the postfix server and try then.