403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/share/doc/opendkim/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/doc/opendkim/setup.lua.sample
--
--  Copyright (c) 2009, 2010, 2012, The Trusted Domain Project.
--    All rights reserved.
--
--  setup.lua.sample -- sample version of the "setup" script that demonstrates
--                      all of the features of the configuration file
--
--  The setup script is executed after all header fields have been received
--  but before any DKIM operations have begun.  Thus, this script can decide
--  what signatures, if any, should be added.

--  We never sign mail to example.net
nrcpts = odkim.rcpt_count(ctx)
for n = 1, nrcpts do
	rcpt = odkim.get_rcpt(ctx, n - 1)
	if string.find(rcpt, "@example.net", 1, true) ~= nil then
		odkim.verify(ctx)
		return nil
	end
end

--  We blindly accept mail that looks like it's from example.org
from = odkim.get_fromdomain(ctx)
if from == "example.org" then
	odkim.set_result(ctx, SMFIS_ACCEPT)
	return nil
end

--  If POP-before-SMTP failed, just verify it
popauth = odkim.check_popauth(ctx)
if popauth == 0 then
	odkim.verify(ctx)
	return nil
end

--  See if {auth_author} was set
author = odkim.get_mtasymbol(ctx, "{auth_author}")

--  If it's not from an internal source or authenticated, just verify it
if odkim.internal_ip(ctx) == 0 and author == nil then
	odkim.verify(ctx)
	return nil
end

--  If MTA name tests were requested, do the test and just verify if no match
mtadb = odkim.get_dbhandle(ctx, DB_MTAS)
if mtadb ~= nil then
	mtaname = odkim.get_mtasymbol(ctx, "{daemon_name}")
	if mtaname ~= nil then
		if odkim.db_check(mtadb, mtaname) == 0 then
			odkim.verify(ctx)
			return nil
		end
	end
end

--  Compare "From" domain to domains DB, just verify if no match
domains = odkim.get_dbhandle(ctx, DB_DOMAINS)
if domains == nil or odkim.db_check(domains, from) == 0 then
	odkim.verify(ctx)
	return nil
end

--  Since we got this far, we're signing; make a signing request using the
--  key "defkey"
odkim.sign(ctx, "defkey")

--  If it looks like it might be going to a list (in that the recipient ends
--  in "-l"), add an "l=" tag.  (We need to add a hook for the body length
--  DB, perhaps.)
for n = 1, nrcpts do
	rcpt = odkim.get_rcpt(ctx, n - 1)
	if string.find(rcpt, "-l@", 1, true) ~= nil then
		odkim.use_ltag(ctx)
	end
end

--  That's it!
return nil

Youez - 2016 - github.com/yon3zu
LinuXploit