2019 m. spalio 15 d., antradienis
2019 m. rugpjūčio 27 d., antradienis
detect spamming sript
Pirmiausia, žiūrėti mail log:
1829AB7A07E3: uid=48 from=<aaa@bbb.lt>
Pirmas stulpelis - mail quue id, antras - proceso id, kuris siunčia.
php.ini turi būti nustatyta: mail.add_x_header = On
1829AB7A07E3: uid=48 from=<aaa@bbb.lt>
Pirmas stulpelis - mail quue id, antras - proceso id, kuris siunčia.
php.ini turi būti nustatyta: mail.add_x_header = On
postcat -q <ID> - pagal mail que id pažiūrėti laišką
postcat -q DA5E8647235C | grep X-PHP-Originating-Script
X-PHP-Originating-Script: 45:badmailer.php
The number 45 is the UID, which is the Linux user ID that ran the script
postcat -q DA5E8647235C | grep sasl_username
Resend messages in the queue: postqueue -f
Pastaba: susitvarkus, paleisti postsuper -d ALL
nes kitaip dar tukstanciai padetu laisku gali buti.
Papildomai, iš išorės galima blokuoti SMTP (jungiantis iš servo rašyti localhost):
iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT
iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT
2019 m. balandžio 21 d., sekmadienis
phpexcel, pdf
/*
$objWriter = PHPExcel_IOFactory::createWriter($doc, 'HTML');
$objWriter->writeAllSheets();
//$objWriter->generateStyles(false);
//echo $objWriter->generateSheetData();
//exit;
$objWriter->save('php://output'); exit;
$css = <<<HTML
<style>
.navigation {display:none}
.gridlines td {border:0;}
</style>
HTML;
require_once('class/pdf/pdftk.php');
ob_start();
$objWriter->save('php://output');
$excelOutput = ob_get_clean();
$excelOutput = str_replace('</head>', $css.'</head>' , $excelOutput);
pdftk::html2pdf($excelOutput,'aaa.pdf', 'L', 'I');
exit;
*/
PHPExcel_Settings::setPdfRenderer(PHPExcel_Settings::PDF_RENDERER_MPDF,'../composer/vendor/mpdf/mpdf/');
$objWriter = PHPExcel_IOFactory::createWriter($doc, 'PDF');
$objWriter->writeAllSheets();
header('Content-type:Application/pdf');
header('Content-Disposition: inline;filename="export.pdf"');
$objWriter->save('php://output');
exit;
2019 m. sausio 1 d., antradienis
letsencrypt free sll instalation and usage
https://letsencrypt.org/
https://www.hostinger.com/tutorials/vps/how-to-install-lets-encrypt-ssl-on-vps-running-vebmin-virtualmin#gref
https://helpdesk.ssls.com/hc/en-us/articles/115001610352-How-to-install-a-SSL-certificate-in-Webmin
https://blog.flaunt7.com/how-to-use-lets-encrypt-on-vesta-login-panel/
https://www.hostinger.com/tutorials/vps/how-to-install-lets-encrypt-ssl-on-vps-running-vebmin-virtualmin#gref
https://helpdesk.ssls.com/hc/en-us/articles/115001610352-How-to-install-a-SSL-certificate-in-Webmin
https://blog.flaunt7.com/how-to-use-lets-encrypt-on-vesta-login-panel/
large file resumable file upload in chunks
http://www.resumablejs.com/
https://github.com/ZiTAL/html5-file-upload-chunk
https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads
https://github.com/flowjs/flow-php-server/blob/master/README.md PHP library for handling chunk uploads.
https://github.com/ZiTAL/html5-file-upload-chunk
https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads
https://github.com/flowjs/flow-php-server/blob/master/README.md PHP library for handling chunk uploads.
javascriot variable isolation and module pattern
https://www.nicoespeon.com/en/2013/05/properly-isolate-variables-in-javascript/
https://toddmotto.com/everything-you-wanted-to-know-about-javascript-scope/
https://toddmotto.com/mastering-the-module-pattern/
https://toddmotto.com/everything-you-wanted-to-know-about-javascript-scope/
https://toddmotto.com/mastering-the-module-pattern/
pipe email to script
https://www.virtualmin.com/node/18059
https://www.virtualmin.com/node/13762
https://serverfault.com/questions/258469/how-to-configure-postfix-to-pipe-all-incoming-email-to-a-script
https://stackoverflow.com/questions/4321159/postfix-and-sending-incoming-emails-to-script-instead-of-sending
http://php-mail-client.github.io/Client/
https://code.google.com/archive/p/imapcopy/ bei imapsync
https://www.virtualmin.com/node/13762
https://serverfault.com/questions/258469/how-to-configure-postfix-to-pipe-all-incoming-email-to-a-script
https://stackoverflow.com/questions/4321159/postfix-and-sending-incoming-emails-to-script-instead-of-sending
http://php-mail-client.github.io/Client/
https://code.google.com/archive/p/imapcopy/ bei imapsync
Užsisakykite:
Pranešimai (Atom)